int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); DESCRIPTION Thepthread_cond_wait()function blocks on the specified condition variable, which atomically releases the specified mutex and causes the calling thread to block on the condition variable The blocked thread may be awak...
条件変数が専用 (PTHREAD_PROCESS_PRIVATE) の場合、mutex も専用でなければ なりません。 条件変数が共用の場合、特定の条件変数用の pthread_cond_wait() また は pthread_cont_timedwait() の呼び出しはすべて、プロセスの存続中、すなわち、 条件変数と mutex の両方が破棄されるまで (pthread_cond...
The pthread_cond_wait() function waits until a pthread_cond_broadcast() or a pthread_cond_signal() is received. For more information on these functions, refer to pthread_cond_broadcast() — Broadcast a condition and to pthread_cond_signal() — Signal a condition.Returned...
每个线程(阻断时由于一个pthread_cond_broadcast()或pthread_cond_signal()返回的呼叫pthread_cond_wait()或pthread_cond_timedwait(),该线程的互斥锁应自己的要求pthread_cond_wait()或pthread_cond_timedwait()。 翻译结果5复制译文编辑译文朗读译文返回顶部 ...
ConditionWaitSemanticsIt is important to note that whenpthread_cond_wait() andpthread_cond_timedwait() return without error, the associated predicate may still be false. Similarly, whenpthread_cond_timedwait() returns with the timeout error, the associated predicate may be true due to an unavoidab...
The pthread_cond_timedwait() function atomically unlocks the mutex and performs the wait for the condition. In this case, atomically means with respect to the mutex and the condition variable and other access by threads to those objects through the pthread condition variable interfaces....
#define _OPEN_THREADS #include <pthread.h> int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime);General Description Allows a thread to wait on a condition variable until satisfied or until a specified time occurs. The pthread_cond_timedwait...
これらの関数の詳細は、pthread_cond_broadcast() - 条件のブロードキャストとpthread_cond_signal() - 条件のシグナル送信を参照してください。戻り値 正常に実行された場合、pthread_cond_wait() は 0 を戻します。 正常に実行されなかった場合、pthread_cond_wait() は -1 を戻して、errno を...
条件変数が専用 (PTHREAD_PROCESS_PRIVATE) の場合、mutex も専用でなければ なりません。 条件変数が共用の場合、特定の条件変数用の pthread_cond_wait() また は pthread_cont_timedwait() の呼び出しはすべて、プロセスの存続中、すなわち、 条件変数と mutex の両方が破棄されるまで (pthread_cond...
The pthread_cond_wait() function waits until a pthread_cond_broadcast() or a pthread_cond_signal() is received. For more information on these functions, refer to pthread_cond_broadcast() — Broadcast a condition and to pthread_cond_signal() — Signal a condition.Returned...