*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> pthread_cond_wait (3)              
Title
Content
Arch
Section
 

PTHREAD_COND_WAIT(3)

Contents


NAME    [Toc]    [Back]

     pthread_cond_wait - wait on a condition variable

SYNOPSIS    [Toc]    [Back]

     #include <pthread.h>

     int
     pthread_cond_wait(pthread_cond_t   *cond,    pthread_mutex_t
*mutex);

DESCRIPTION    [Toc]    [Back]

     The  pthread_cond_wait() function atomically blocks the current thread
     waiting on the condition variable specified by cond, and unblocks the mutex
  specified  by  mutex.  The waiting thread unblocks only
after another
     thread calls pthread_cond_signal(3), or  pthread_cond_broadcast(3) with
     the  same  condition  variable, and the current thread reacquires the lock
     on mutex.

RETURN VALUES    [Toc]    [Back]

     If successful, the pthread_cond_wait() function will  return
zero.  Otherwise
 an error number will be returned to indicate the error.

ERRORS    [Toc]    [Back]

     pthread_cond_wait() will fail if:

     [EINVAL]      The value specified by cond or the value specified by mutex
                   is invalid.

SEE ALSO    [Toc]    [Back]

      
      
     pthread_cond_broadcast(3),          pthread_cond_destroy(3),
pthread_cond_init(3),
     pthread_cond_signal(3), pthread_cond_timedwait(3)

STANDARDS    [Toc]    [Back]

     pthread_cond_wait()   conforms   to   ISO/IEC    9945-1:1996
(``POSIX'').

OpenBSD      3.6                           July      28,     1998
[ Back ]
 Similar pages
Name OS Title
pthread_cond_wait Tru64 Causes a thread to wait for the specified condition variable to be signaled or broadcasted
pthread_cond_timedwait FreeBSD wait on a condition variable for a specific amount of time
pthread_cond_timedwait OpenBSD wait on a condition variable for a specific amount of time
tis_cond_timedwait Tru64 Causes a thread to wait for the specified condition variable to be signaled or broadcast, such that ...
tis_cond_wait Tru64 Causes a thread to wait for the specified condition variable to be signaled or broadcast
clear_wait Tru64 General: Clears the wait condition
tkwait IRIX Wait for variable to change or window to be destroyed
cv_init FreeBSD kernel condition variable
tis_cond_destroy Tru64 Destroys the specified condition variable
pthread_cond_destroy FreeBSD destroy a condition variable
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service