.\" Copyright (C) 1996-1999 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of .\" this manual under the conditions for verbatim copying, provided that .\" the entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Permission is granted to copy and distribute translations of this .\" manual into another language, under the above conditions for modified .\" versions, except that this permission notice may be stated in a .\" translation approved by the Foundation. .\" .\" Copyright (C) 1996 Xavier Leroy. .\" .\" Japanese Version Copyright (C) 2003 Suzuki Takashi .\" all rights reserved. .\" Translated Sun Jan 5 18:06:27 JST 2003 .\" by Suzuki Takashi. .\" .\"WORD: condition attribute object 条件変数属性オブジェクト .\" .\" .TH PTHREAD_CONDATTR 3 LinuxThreads .SH "名前" pthread_condattr_init, pthread_condattr_destroy \- 条件変数作成時の属性 .SH "書式" .B #include .BI "int pthread_condattr_init(pthread_condattr_t *" attr ");" .BI "int pthread_condattr_destroy(pthread_condattr_t *" attr ");" .SH "説明" 条件変数の属性は条件変数の作成時に、 .BR "pthread_cond_init" (3) の第 2 引数として条件変数属性オブジェクトを渡すことで 指定することができる。 .B "NULL" を渡すことは、 すべての属性がデフォルト値に設定された条件変数属性オブジェクトを 渡すことと同等である。 LinuxThreads の実装では、条件変数の属性には一切対応していない。 条件変数の属性に関する関数は POSIX 標準との互換性を保つためだけに 用意されている。 .B "pthread_condattr_init" は条件変数属性オブジェクト .I "attr" を初期化し、すべての属性をデフォルト値に設定する。 .B "pthread_condattr_destroy" は条件変数属性オブジェクトを破壊する。 破壊したオブジェクトは再び初期化されるまで再使用してはならない。 これらの関数は両方とも、 LinuxThreads の実装では何もしない。 .SH "返り値" .B "pthread_condattr_init" および .B "pthread_condattr_destroy" は常に 0 を返す。 .SH "著者" Xavier Leroy .SH "関連項目" .BR "pthread_cond_init" (3). [訳注] LinuxThreads では条件変数をプロセス間で共有することはできない。 glibc-linuxthreads-2.2 以降、次の 2 つの関数が追加されている。 .BI "int pthread_condattr_getpshared(const pthread_condattr_t *" attr ", int *" pshared ");" .I "pshared" で指し示される領域に .B "PTHREAD_PROCESS_PRIVATE" を格納し、常に 0 を返す。 .BI "int pthread_condattr_setpshared(pthread_condattr_t *" attr ", int " pshared ");" .I "pshared" が .B "PTHREAD_PROCESS_PRIVATE" および .B "PTHREAD_PROCESS_SHARED" のいずれでもない場合、 .B "EINVAL" を返す。 .I "pshared" が .B "PTHREAD_PROCESS_SHARED" の場合、 .B "ENOSYS" を返す。 それ以外の場合、 0 を返す。