JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... s_np(void); 説明 pthread_kill_other_threads_np () は、 LinuxThreads スレッド実装においてのみ効果がある。 LinuxThreads スレッド実装では、この関数を呼び出すと アプリケー ... ない。 属性 この節で使用されている用語の説明については、 attributes (7) を参照。 インターフェース 属性 値 pthread_kill_other_threads_np () Thread safety MT-Safe 準拠 この関数は非標準の GNU による拡張である。 そのため、名前に "_np" (nonportable; 移植性がな ... い) という接尾辞が 付いている。 注意 pthread_kill_other_threads_np () は、 スレッドが execve (2) や同様の関数を呼び出す直前に 呼ばれることを目的として用意されている。 この関数は、(廃止予 ... ... た場合は、 pthread_create () は返る前に新しいスレッドの ID を thread が指すバッファーに格納する。この ID は、これ以降に他の pthreads 関数の呼び出しでスレッドを参照するのに使用される。 新しいスレッドは、スレッドを作成したスレッドのシグナルマスク ( pthread_ ... に達していた ( setrlimit (2) で設定できる)。 カーネルのシステム全体のプロセスとスレッドの数の上限値である /proc/sys/kernel/threads-max が達していた ( proc (5) 参照)。 PID の最大値 /proc/sys/kernel/pid_max に達していた ( proc (5) 参照)。 EINVAL attr で指 ... ない。 属性 この節で使用されている用語の説明については、 attributes (7) を参照。 インターフェース 属性 値 pthread_create () Thread safety MT-Safe 準拠 POSIX.1-2001, POSIX.1-2008. 注意 pthread_create () が *thread で返すスレッド ID についての 詳しい情報は ... ... , aio_return (), aio_suspend (), aio_write (), lio_listio (). BAR - _POSIX_BARRIERS - _SC_BARRIERS このオプションは _POSIX_THREADS と _POSIX_THREAD_SAFE_FUNCTIONS オプションを暗黙の内に指定する。 以下の関数が存在する。 pthread_barrier_destroy (), pthrea ... を受ける。 getsockopt (), setsockopt (). --- - _POSIX_READER_WRITER_LOCKS - _SC_READER_WRITER_LOCKS このオプションは _POSIX_THREADS オプションを暗黙の内に指定する。 逆に POSIX.1-2001 では _POSIX_THREADS オプションはこのオプションを暗黙の内に指定する。 以 ... attr_setschedparam (), posix_spawnattr_setschedpolicy (). SPI - _POSIX_SPIN_LOCKS - _SC_SPIN_LOCKS このオプションは _POSIX_THREADS と _POSIX_THREAD_SAFE_FUNCTIONS オプションを暗黙の内に指定する。 以下の関数が存在する。 pthread_spin_destroy (), pthread_s ... ... ューニングの情報は、引数 init が指すバッファーで与える。 このバッファーは以下の形式の構造体である。 struct aioinit { int aio_threads; /* Maximum number of threads */ int aio_num; /* Number of expected simultaneous requests */ int aio_locks; /* Not used */ ... re idle thread terminates (since glibc 2.2) */ int aio_reserved; }; aioinit 構造体のフィールドのうち以下が使用される。 aio_threads このフィールドは、AIO の実装が使用できるワーカースレッド数の最大値を指定する。 完了していない I/O 操作の数がこの上限を超え ... ... 加された。 属性 この節で使用されている用語の説明については、 attributes (7) を参照。 インターフェース 属性 値 malloc_info () Thread safety MT-Safe 準拠 この関数は GNU による拡張である。 注意 メモリー割り当て情報は (C の構造体ではなく) XML 文字列として提供 ... lude < stdlib.h > #include < pthread.h > #include < malloc.h > #include < errno.h > static size_t blockSize; static int numThreads, numBlocks; #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) static void * thread_func(void *arg) ... ead terminates */ return NULL; } int main(int argc, char *argv[]) { int sleepTime; if (argc < 4) { fprintf(stderr, "%s num-threads num-blocks block-size [sleep-time]\n", argv[0]); exit(EXIT_FAILURE); } numThreads = atoi(argv[1]); numBlocks = atoi(argv[2 ... ... スに -1 が返され、子プロセスは生成されず、 errno が適切に設定される。 エラー EAGAIN A system-imposed limit on the number of threads was encountered. There are a number of limits that may trigger this error: * the RLIMIT_NPROC soft resource limit (set via ... setrlimit (2)), which limits the number of processes and threads for a real user ID, was reached; * the kernel's system-wide limit on the number of processes and threads, /proc/sys/kernel ... /threads-max , was reached (see proc (5)); * the maximum number of PIDs, /proc/sys/kernel/pid_max , was reached (see proc (5)); or ... ... リとカーネルの違い At the kernel level, user IDs and group IDs are a per-thread attribute. However, POSIX requires that all threads in a process share the same credentials. The NPTL threading implementation handles the POSIX requirements by providing wra ... he one for setgid ()) employ a signal-based technique to ensure that when one thread changes credentials, all of the other threads in the process also change their credentials. For details, see nptl (7). 関連項目 getgid (2), setegid (2), setregid (2), c ... ... リとカーネルの違い At the kernel level, user IDs and group IDs are a per-thread attribute. However, POSIX requires that all threads in a process share the same credentials. The NPTL threading implementation handles the POSIX requirements by providing wra ... he one for setgid ()) employ a signal-based technique to ensure that when one thread changes credentials, all of the other threads in the process also change their credentials. For details, see nptl (7). 関連項目 getgid (2), setegid (2), setregid (2), c ... ... 参照。 属性 この節で使用されている用語の説明については、 attributes (7) を参照。 インターフェース 属性 値 pthread_sigmask () Thread safety MT-Safe 準拠 POSIX.1-2001, POSIX.1-2008. 注意 新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを ... ", sig); } } int main(int argc, char *argv[]) { pthread_t thread; sigset_t set; int s; /* Block SIGQUIT and SIGUSR1; other threads created by main() will inherit a copy of the signal mask. */ sigemptyset(&set); sigaddset(&set, SIGQUIT); sigaddset(&set, ... ead, NULL, &sig_thread, &set); if (s != 0) handle_error_en(s, "pthread_create"); /* Main thread carries on to create other threads and/or do other work */ pause(); /* Dummy pause so we can test program */ } 関連項目 sigaction (2), sigpending (2), sigpro ... ... リとカーネルの違い At the kernel level, user IDs and group IDs are a per-thread attribute. However, POSIX requires that all threads in a process share the same credentials. The NPTL threading implementation handles the POSIX requirements by providing wra ... () and setresgid ()) employ a signal-based technique to ensure that when one thread changes credentials, all of the other threads in the process also change their credentials. For details, see nptl (7). 関連項目 getresuid (2), getuid (2), setfsgid (2), ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。