JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... 説明 pthread_self () 関数は、呼び出したスレッドの ID を返す。 得られる ID は、このスレッドが作成された pthread_create (3) の 呼び出しで *thr ... は常に成功する。 属性 この節で使用されている用語の説明については、 attributes (7) を参照。 インターフェース 属性 値 pthread_self () Thread safety MT-Safe 準拠 POSIX.1-2001, POSIX.1-2008. 注意 POSIX.1 では、スレッド ID を表現するのに使用する型は、 スレ ... oin されたり、 切り離された (detached) スレッドが終了されたりした後は、 そのスレッド ID は再利用されることがある。 pthread_self () が返すスレッド ID は、 gettid (2) が返すカーネルスレッド ID とは違うものである。 関連項目 pthread_create (3), pthread_e ... ... リでない場合、 エラー ENOTDIR が発生する。 FAN_MARK_MOUNT Mark the mount point specified by pathname . If pathname is not itself a mount point, the mount point containing pathname will be marked. All directories, subdirectories, and the contained file ... equire that filesystem objects are identified by file handles, such as FAN_CREATE , FAN_ATTRIB , FAN_MOVE , and FAN_DELETE_SELF , cannot be provided as a mask when flags contains FAN_MARK_MOUNT . Attempting to do so will result in the error EINVAL be ... in a marked parent directory. An fanotify group that identifies filesystem objects by file handles is required. FAN_DELETE_SELF (Linux 5.1 以降) Create an event when a marked file or directory itself is deleted. An fanotify group that identifies file ... ... 。 procfs がマウントされている場合、これは AT_EMPTY_PATH の代替として以下のように使うことができる。 linkat(AT_FDCWD, "/proc/self/fd/<fd>", newdirfd, newname, AT_SYMLINK_FOLLOW); カーネル 2.6.18 より前では、 flags 引数は未使用で、 0 を指定しなければなら ... C_READ_SEARCH ケーパビリティを持っていなかった。 ENOENT 以下の呼び出しで作成されたファイルディスクリプターに対応する /proc/self/fd/NN ファイルに対してリンクを行おおうとした。 open(path, O_TMPFILE | O_EXCL, mode); open (2) 参照。 ENOENT 削除済みのファ ... イルに対応する /proc/self/fd/NN ファイルに対してリンクを行おおうとした。 ENOENT oldpath が相対パス名で、 olddirfd が削除されたディレクトリを参照して ... ... 。 procfs がマウントされている場合、これは AT_EMPTY_PATH の代替として以下のように使うことができる。 linkat(AT_FDCWD, "/proc/self/fd/<fd>", newdirfd, newname, AT_SYMLINK_FOLLOW); カーネル 2.6.18 より前では、 flags 引数は未使用で、 0 を指定しなければなら ... C_READ_SEARCH ケーパビリティを持っていなかった。 ENOENT 以下の呼び出しで作成されたファイルディスクリプターに対応する /proc/self/fd/NN ファイルに対してリンクを行おおうとした。 open(path, O_TMPFILE | O_EXCL, mode); open (2) 参照。 ENOENT 削除済みのファ ... イルに対応する /proc/self/fd/NN ファイルに対してリンクを行おおうとした。 ENOENT oldpath が相対パス名で、 olddirfd が削除されたディレクトリを参照して ... ... for the filesystem mount that corresponds to pathname . This corresponds to the first field in one of the records in /proc/self/mountinfo . Opening the pathname in the fifth field of that record yields a file descriptor for the mount point; that file ... rfd 引数として渡すことで、 そのシンボリックリンクに対して操作を行うことができる。 永続的なファイルシステム ID の取得 /proc/self/mountinfo のマウント ID は、 ファイルシステムのアンマウント、マウントが行われるに連れて再利用されることがある。 したがって ... n_by_handle_at () の mount_fd 引数は、 この引数で渡された名前のディレクトリをオープンして取得する。 それ以外の場合、 /proc/self/mountinfo からスキャンして標準入力から読み込んだマウント ID に一致するマウント ID を検索し、 そのレコードで指定されているマ ... ... for the filesystem mount that corresponds to pathname . This corresponds to the first field in one of the records in /proc/self/mountinfo . Opening the pathname in the fifth field of that record yields a file descriptor for the mount point; that file ... rfd 引数として渡すことで、 そのシンボリックリンクに対して操作を行うことができる。 永続的なファイルシステム ID の取得 /proc/self/mountinfo のマウント ID は、 ファイルシステムのアンマウント、マウントが行われるに連れて再利用されることがある。 したがって ... n_by_handle_at () の mount_fd 引数は、 この引数で渡された名前のディレクトリをオープンして取得する。 それ以外の場合、 /proc/self/mountinfo からスキャンして標準入力から読み込んだマウント ID に一致するマウント ID を検索し、 そのレコードで指定されているマ ... ... rof -p libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile Flat profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls us/call us/call name 60.00 0.06 0.06 100 600.00 consumeCpu1 40.00 0.10 0.04 1000 40. ... オプションを使うと、 コールグラフが生成される。 $ sprof -q libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile index % time self children called name 0.00 0.00 100/100 x1 [1] [0] 100.0 0.00 0.00 100 consumeCpu1 [0] ------------------------------------ ... ... < 2000000; j++) getppid(); pclock("Process total CPU time: ", CLOCK_PROCESS_CPUTIME_ID); s = pthread_getcpuclockid(pthread_self(), &cid); if (s != 0) handle_error_en(s, "pthread_getcpuclockid"); pclock("Main thread CPU time: ", cid); /* The preceding ... inates both threads */ } 関連項目 clock_gettime (2), clock_settime (2), timer_create (2), clock_getcpuclockid (3), pthread_self (3), pthreads (7), time (7) この文書について この man ページは Linux man-pages プロジェクトのリリース 5.10 の一部である。プ ... ... irectory was created in a watched parent. FAN_DELETE A child file or directory was deleted in a watched parent. FAN_DELETE_SELF A watched file or directory was deleted. FAN_MOVED_FROM A file or directory has been moved from a watched parent directory ... . FAN_MOVED_TO A file or directory has been moved to a watched parent directory. FAN_MOVE_SELF 監視対象のディレクトリやファイルが移動された。 FAN_MODIFY ファイルが変更された。 FAN_CLOSE_WRITE 書き込み用 ( O_WRONLY か ... a len field. The value of len is the size of the additional information record including the fanotify_event_info_header itself. The total size of all additional information records is not expected to be bigger than ( event_len - metadata_len ). fsid ... ... y of other thread in the same thread group (see the discussion of CLONE_THREAD in clone (2)), by writing to the file /proc/self/task/[tid]/comm . Strings longer than TASK_COMM_LEN (16) characters are silently truncated. This file provides a superset ... ようになる。 例えば、 -i を入力ファイルを指定するフラ グ、 -o を出力ファイルを指定するフラグと仮定すると、 $ foobar -i /proc/self/fd/0 -o /proc/self/fd/1 ... を実行することにより、フィルタとして動作させることができる。 /proc/self/fd/N は、ある種の UNIX ... や UNIX 風のシステムにある /dev/fd/N とだいたい同じである。 事実 Linux のたいていの MAKEDEV スクリプトは、 /dev/fd を /proc/self/fd へのシンボリックリンクにしている。 ほとんどのシステムでは、シンボリックリンク /dev/stdin , /dev/stdout , /dev/stderr が ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。