| No | 日付 | タイトル | 場所 | 補足 |
|---|---|---|---|---|
| 1 | 5 | 左利きの少女 | テアトル梅田 | |
| 2 | 5 | ヒンド・ラジャブの声 | 難波PC | |
| 3 | 6 | SEKIRO: NO DEFEAT | TJ梅田 | Dolby Atmos |
| 4 | 10 | 劇場版 少女⭐︎歌劇 レヴュースタァライト | TJ梅田 | Dolby Atmos |
| 5 | 12 | 劇場版モノノ怪 第二章 火鼠 | 秋葉原UDX | ドリパス |
| 6 | 12 | 劇場版モノノ怪 第三章 蛇神 | 秋葉原UDX | ドリパス |
| 7 | 12 | トラペジウム | 秋葉原UDX | ドリパス |
| 8 | 13 | ネルソンさん、あなたは人を殺しましたか? | KC新宿 | |
| 9 | 13 | アイの歌声を聴かせて | 秋葉原UDX | ドリパス |
| 10 | 13 | 映画大好きポンポさん | シネマチュプキ田端 | |
| 11 | 14 | スターヴ・エイカー 召喚 | KC心斎橋 | |
| 12 | 18 | 超かぐや姫! | TC門真 | 轟音 |
| 13 | 19 | ルックバック | TC難波 | |
| 14 | 19 | ひゃくえむ。 | KC心斎橋 | 舞台挨拶 |
| 15 | 21 | さとこはいつも | TC難波 | |
| 16 | 22 | 超かぐや姫! | TC難波 | MX4D |
| 17 | 25 | 超かぐや姫! | TC樟葉 | Dolby Atmos |
| 18 | 26 | 我々は宇宙人 | TC難波 | |
| 19 | 27 | 縁の手紙 | TC難波 | |
| 20 | 28 | 超かぐや姫! | TJ京都 | SCREEN X with Dolby Atmos |
2026年8月 映画鑑賞記録
| No | 日付 | タイトル | 場所 | 補足 |
|---|---|---|---|---|
| 1 | 1 | インビジブルハーフ | TC難波 | |
| 2 | 1 | 快速急行□□行き | 難波PC | |
| 3 | 2 | スパイダーマン:ブランド・ニュー・デイ | TC樟葉 | TCX |
| 4 | 7 | 開戦前夜 | テアトル梅田 | |
| 5 | 10 | 映画ちいかわ 人魚の島の秘密 | TJ梅田 | |
| 6 | 10 | 千年女優 | 塚口SST | |
| 7 | 10 | パプリカ | 塚口SST | |
| 8 | 12 | パプリカ | テアトル梅田 | |
| 9 | 12 | 千年女優 | 塚口SST | |
| 10 | 14 | オークストリートの異変 | 丸の内ピカデリー | Dolby Cinema |
| 11 | 16 | 劇場版 魔法少女まどか☆マギカ 新編 叛逆の物語 | TJ梅田 | Dolby Cinema |
| 12 | 17 | パプリカ | テアトル梅田 | odessa |
| 13 | 22 | しらぬい | TJ梅田 | |
| 14 | 23 | レンタル家族 | AC茨木 | |
| 15 | 28 | ラスト・サバイバー | TC門真 | |
| 16 | 29 | 顔 -かお- | KC心斎橋 | |
| 17 | 29 | 劇場版 魔法少女まどか☆マギカ ワルプルギスの廻天 | TC難波 | IMAX |
| 18 | 30 | 平行と垂直 | TJ梅田 | |
| 19 | 30 | 恐怖分子 | テアトル梅田 |
Linux TTYサブシステムのメモ
ディレクトリ構成
linux/
├── drivers/tty/
│ ├── tty_io.c ★ TTY コア
│ ├── tty_ldisc.c ★ 行規律管理
│ ├── n_tty.c ★ N_TTY 実装
│ ├── pty.c ★ PTY 実装
│ ├── tty_port.c TTY ポート実装
│ ├── tty_buffer.c バッファ管理
│ ├── serial/
│ │ ├── 8250_core.c 16550 UART ドライバ
│ │ └── serial_core.c シリアルコア
│ └── vt/
│ └── vt.c 仮想端末
│
├── include/linux/
│ ├── tty.h ★ TTY 構造体定義
│ ├── tty_driver.h ★ TTY ドライバ定義
│ ├── tty_ldisc.h 行規律定義
│ ├── termios.h termios API
│ └── serial_core.h シリアルコア定義
│
└── Documentation/driver-api/tty/
├── index.rst ★ 主要ドキュメント
├── tty_driver.rst
├── tty_struct.rst
├── tty_ldisc.rst
├── tty_port.rst
└── tty_buffer.rst
主要な構造体
struct tty_struct (include/linux/tty.h)
定義
struct tty_struct { struct kref kref; // 参照カウント int index; // デバイスインデックス struct device *dev; // デバイス構造体へのポインタ struct tty_driver *driver; // このttyのドライバーへのポインタ struct tty_port *port; // 永続的なポート情報への参照 const struct tty_operations *ops; // ドライバーの操作関数テーブル // Line Discipline (行規律) 関連 struct tty_ldisc *ldisc; // 行規律へのポインタ struct ld_semaphore ldisc_sem; // 行規律のセマフォ // 同期化 struct mutex atomic_write_lock; // 書き込みロック struct mutex legacy_mutex; struct mutex throttle_mutex; struct rw_semaphore termios_rwsem; // termios設定用の読み書きセマフォ struct mutex winsize_mutex; // ウィンドウサイズ変更ロック // ターミナル設定 struct ktermios termios, termios_locked; // termios設定 char name[64]; // tty名(/dev/tty0など) unsigned long flags; // TTY_THROTTLED など状態フラグ int count; // オープン数 unsigned int receive_room; // 受信バッファの空き容量 struct winsize winsize; // ウィンドウサイズ // フロー制御 struct { spinlock_t lock; bool stopped; // 出力停止フラグ bool tco_stopped; } flow; // プロセス制御 struct { struct pid *pgrp; // フォアグラウンドプロセスグループ struct pid *session; // セッション spinlock_t lock; unsigned char pktstatus; bool packet; } ctrl; // その他 bool hw_stopped; // ハードウェア停止フラグ bool closing; // クローズ中フラグ int flow_change; // フロー制御の変更状態 struct tty_struct *link; // PTYの場合のリンク先 struct fasync_struct *fasync; // async I/O用 wait_queue_head_t write_wait; // 書き込み待機キュー wait_queue_head_t read_wait; // 読み込み待機キュー struct work_struct hangup_work; // ハングアップ処理用ワーク void *disc_data; // line disciplineの私有データ void *driver_data; // ドライバーの私有データ spinlock_t files_lock; // tty_filesリスト保護用 int write_cnt; // write_bufへの書き込みバイト数 u8 *write_buf; // 一時書き込みバッファ struct list_head tty_files; // 再度オープンしたファイルのリスト struct work_struct SAK_work; // Secure Attention Key処理用 };
役割
TTYデバイスのコア構造体で、オープンされているtty全体の状態を管理します。
- ttyのオープンされたインスタンスを代表
- ユーザー空間とハードウェア間のデータ流通を管理
- ターミナル設定(termios)とフロー制御を保持
struct tty_port (include/linux/tty_port.h)
定義
struct tty_port { struct tty_bufhead buf; // バッファヘッド struct tty_struct *tty; // 現在の tty_struct へのポインタ struct tty_struct *itty; // 内部用バックポインタ const struct tty_port_operations *ops; // ポート操作関数テーブル const struct tty_port_client_operations *client_ops; // クライアント操作 spinlock_t lock; // ポート全体のロック int blocked_open; // open()待ちのプロセス数 int count; // 使用中のカウント wait_queue_head_t open_wait; // キャリア検出など待機 wait_queue_head_t delta_msr_wait; // モデム状態変更待機 unsigned long flags; // ユーザーTTYフラグ(ASYNC_) unsigned long iflags; // 内部フラグ(TTY_PORT_) unsigned char console:1; // コンソール用 struct mutex mutex; // オープン/クローズ/シャットダウン用 struct mutex buf_mutex; // 送信バッファ割り当てロック u8 *xmit_buf; // 送信バッファ DECLARE_KFIFO_PTR(xmit_fifo, u8); // 送信FIFO unsigned int close_delay; // クローズ時の遅延 unsigned int closing_wait; // クローズ前の出力送信待ち int drain_delay; // ドレイン遅延 struct kref kref; // 参照カウント void *client_data; // プライベートデータポインタ }; /* iflags フラグビット */ #define TTY_PORT_INITIALIZED 0 // デバイス初期化済み #define TTY_PORT_SUSPENDED 1 // デバイス中断 #define TTY_PORT_ACTIVE 2 // デバイスオープン #define TTY_PORT_CTS_FLOW 3 // ハードウェアフロー制御有効 #define TTY_PORT_CHECK_CD 4 // キャリア検出有効 #define TTY_PORT_KOPENED 5 // カーネルが独占オープン
役割
ポートレベルの情報を保持する構造体で、複数のttyインスタンスで共有される永続的なストレージです。
- デバイス固有の永続的な情報を保持
- tty_struct と異なり、ハングアップ後も生存
- フロー制御やキャリア検出などの低レベル操作
struct tty_operations (include/linux/tty_driver.h)
定義
struct tty_operations { // デバイス管理 struct tty_struct * (*lookup)(struct tty_driver *driver, struct file *filp, int idx); int (*install)(struct tty_driver *driver, struct tty_struct *tty); void (*remove)(struct tty_driver *driver, struct tty_struct *tty); // オープン/クローズ int (*open)(struct tty_struct *tty, struct file *filp); void (*close)(struct tty_struct *tty, struct file *filp); void (*shutdown)(struct tty_struct *tty); void (*cleanup)(struct tty_struct *tty); // 読み書き ssize_t (*write)(struct tty_struct *tty, const u8 *buf, size_t count); int (*put_char)(struct tty_struct *tty, u8 ch); void (*flush_chars)(struct tty_struct *tty); unsigned int (*write_room)(struct tty_struct *tty); unsigned int (*chars_in_buffer)(struct tty_struct *tty); // 制御 int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); // フロー制御 void (*throttle)(struct tty_struct *tty); void (*unthrottle)(struct tty_struct *tty); void (*stop)(struct tty_struct *tty); void (*start)(struct tty_struct *tty); // その他 void (*hangup)(struct tty_struct *tty); int (*break_ctl)(struct tty_struct *tty, int state); // ... 他にも多数 };
役割
ドライバーがttyコアに提供する操作関数テーブルです。ドライバーはこれを実装します。 * ドライバーがハードウェアとの低レベル操作を実装 * TTYコアはこれらの関数ポインタを通じてドライバーを呼び出す
struct tty_driver (include/linux/tty_driver.h)
定義
struct tty_driver { struct kref kref; // 参照カウント struct cdev **cdevs; // /dev/デバイス struct module *owner; // モジュール所有権 const char *driver_name; // ドライバー名(/proc用) const char *name; // /dev/nodeの名前 int name_base; // /dev/node番号ベース int major; // メジャー番号 int minor_start; // 最初のマイナー番号 unsigned int num; // デバイス数 enum tty_driver_type type; // ドライバータイプ enum tty_driver_subtype subtype; // サブタイプ struct ktermios init_termios; // 初期termios設定 unsigned long flags; // ドライバーフラグ struct workqueue_struct *flip_wq; // フリップバッファ処理用キュー // デバイスデータ配列 struct tty_struct **ttys; // アクティブなttyの配列 struct tty_port **ports; // tty_portの配列 struct ktermios **termios; // termios設定の配列 void *driver_state; // ドライバー私有データ const struct tty_operations *ops; // 操作テーブル struct list_head tty_drivers; // ドライバーリンク用 };
役割
TTYドライバーそのものを表す構造体。複数のttyデバイスを管理します。
- 複数のttyデバイスを一括管理
- 各デバイスの操作テーブルと初期設定を提供
struct tty_ldisc (include/linux/tty_ldisc.h)
定義
struct tty_ldisc { const struct tty_ldisc_ops *ops; // 行規律の操作テーブル struct tty_struct *tty; // このlDiscが属するtty }; struct tty_ldisc_ops { char *name; int num; // ユーザー空間からの呼び出し int (*open)(struct tty_struct *tty); void (*close)(struct tty_struct *tty); void (*flush_buffer)(struct tty_struct *tty); ssize_t (*read)(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr, void **cookie, unsigned long offset); ssize_t (*write)(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr); int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); __poll_t (*poll)(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait); void (*hangup)(struct tty_struct *tty); // ドライバーからの呼び出し void (*receive_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*write_wakeup)(struct tty_struct *tty); // ... 他のコールバック };
役割
行規律(Line Discipline)を管理する構造体。
- ユーザー空間とドライバー間のデータ処理を中介
- キャノニカルモード(行編集)、raw modeなど入出力処理を実装
- 標準はN_TTY行規律で、シェル用の行編集機能を提供
図解
データフロー図
ユーザー空間
|
| read/write
v
+------------------------------------------+
| tty_struct | (tty_io.c)
| - 開いているttyの状態管理 |
| - user空間との I/O中介 |
+------------------------------------------+
|
| line discipline
v
+------------------------------------------+
| tty_ldisc(行規律) |
| - 行編集(N_TTY)など処理 |
+------------------------------------------+
|
| ドライバー操作
v
+------------------------------------------+
| tty_driver/tty_port |
| - ハードウェア固有処理 |
| - UART送受信など |
+------------------------------------------+
|
v
ハードウェア
UML図

シーケンス図

2026年7月 映画鑑賞記録
| No | 日付 | タイトル | 場所 | 補足 |
|---|---|---|---|---|
| 1 | 4 | ロングウォーク | TJ梅田 | |
| 2 | 4 | 劇場版モノノ怪 第三章 蛇神 | TC難波 | 轟音 |
| 3 | 11 | 急に具合が悪くなる | TC難波 | |
| 4 | 11 | 劇場版モノノ怪 第三章 蛇神 | TC難波 | 轟音 |
| 5 | 12 | がんばっていきまっしょい | ヤマカまなびパーク | |
| 6 | 25 | 映画ちいかわ 人魚の島の秘密 | TJ梅田 | |
| 7 | 25 | ピーコック | テアトル梅田 | |
| 8 | 26 | かがみの孤城 | 岡山県立図書館 |
2026年6月 映画鑑賞記録
| No | 日付 | タイトル | 場所 | 補足 |
|---|---|---|---|---|
| 1 | 6 | 劇場版モノノ怪 第三章 蛇神 | TC門真 | 轟音 |
| 2 | 6 | Never After Dark | TC門真 | |
| 3 | 6 | 劇場版モノノ怪 第三章 蛇神 | TC樟葉 | |
| 4 | 6 | 劇場版モノノ怪 第三者 蛇神 | TC門真 | 轟音 |
| 5 | 7 | シラート | テアトル梅田 | |
| 6 | 10 | 超かぐや姫! | MOVIX八尾 | ライブ音響 |
| 7 | 11 | 劇場版モノノ怪 第三章 蛇神 | TC樟葉 | |
| 8 | 13 | マイケル | TC門真 | |
| 9 | 13 | 劇場版モノノ怪 第三章 蛇神 | TC門真 | 轟音 |
| 10 | 14 | FUJIKO | 大阪SCC | 舞台挨拶 |
| 11 | 20 | 劇場版モノノ怪 第三章 蛇神 | TC難波 | 発声可能 |
| 12 | 20 | 遺愛 | テアトル梅田 | |
| 13 | 20 | 君は映画 | TC難波 | |
| 14 | 21 | 劇場版モノノ怪 第三章 蛇神 | TC難波 | 轟音 |
| 15 | 21 | 超かぐや姫 | 出町座 | |
| 16 | 27 | Erica | KC新宿 | |
| 17 | 28 | 劇場版モノノ怪 第三章 蛇神 | TC上野 | 轟音 |
| 18 | 29 | 傘少女 | KC心斎橋 |
2026年5月 映画鑑賞記録
| No | 日付 | タイトル | 場所 | 補足 |
|---|---|---|---|---|
| 1 | 4 | アメリと雨の物語 | 塚口SST | |
| 2 | 4 | カラオケ行こ! | 塚口SST | |
| 3 | 6 | 超かぐや姫! | 立川シネマシティ | |
| 4 | 9 | サンキュー、チャック | AC茨木 | |
| 5 | 9 | ゼイ・ウィル・キル・ユー | 大阪SCC | |
| 6 | 16 | ひつじ探偵団 | TC門真 | |
| 7 | 17 | THE MUMMY/ザ・マミー 棺の中の少女 | 大阪SCC | |
| 8 | 17 | パリに咲くエトワール | 塚口SST | |
| 9 | 22 | 超かぐや姫! | ヱビスシネマ | |
| 10 | 23 | がんばっていきまっしょい | 塩山シネマ | |
| 11 | 29 | 劇場版モノノ怪 第三章 蛇神 | TC門真 | |
| 12 | 30 | 廃用身 | TC難波 | |
| 13 | 30 | 映画大好きポンポさん | 難波PC | |
| 14 | 31 | 劇場版モノノ怪 第三章 蛇神 | TC門真 | 轟音 |
| 15 | 31 | パリに咲くエトワール | 塚口SST |
2026年4月 映画鑑賞記録
| No | 日付 | タイトル | 場所 | 補足 |
|---|---|---|---|---|
| 1 | 4 | 90メートル | TJ梅田 | |
| 2 | 4 | 超かぐや姫! | 難波PC | |
| 3 | 11 | ひゃくえむ。 スタッフコメンタリー ver. | KC心斎橋 | ティーチイン |
| 4 | 11 | ひゃくえむ。 メイキングドキュメンタリー | KC心斎橋 | |
| 5 | 12 | 超かぐや姫! | TJ梅田 | |
| 6 | 18 | パリに咲くエトワール | 大阪SCC | |
| 7 | 18 | 人狼 JIN-ROH | 塚口SST | |
| 8 | 19 | 超かぐや姫! | AC茨木 | |
| 9 | 23 | チェンソーマン レゼ篇 | 塚口SST | |
| 10 | 25 | 超かぐや姫! | TJ梅田 | |
| 11 | 26 | 最終楽章 響け!ユーフォニアム 前編 | TC樟葉 | |
| 12 | 26 | パリに咲くエトワール | 大阪SCC |