[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


tis_cond_wait

Causes a thread to wait for a condition variable to be signaled or broadcast.

Syntax

tis_cond_wait(
              cond,
              mutex );
 


Argument Data Type Access

cond opaque pthread_cond_t modify mutex opaque pthread_mutex_t modify


C Binding

#include 

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

Arguments

cond
Address of the condition variable (passed by reference) on which to wait.
mutex
Address of the mutex (passed by reference) which is associated with the condition variable specified in cond.

Description

When threads are present, this routine causes a thread to wait for a condition variable to be signaled or broadcast.

Calling this routine in a nonthreaded environment is a coding error. No thread can execute in parallel to issue a tis_cond_signal or tis_ cond_broadcast, using this routine in a nonthreaded environment will force the program to exit.

For further information about actions when threads are present, refer to the pthread_cond_wait description.

Return Values

If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows:
Return        Description

0 Successful completion. [EINVAL] The value specified by cond or mutex is invalid, or: Different mutexes are supplied for concurrent tis_cond_wait operations on the same condition variable, or: The mutex was not owned by the current thread at the time of the call.


Associated Routines

   tis_cond_broadcast
   tis_cond_destroy
   tis_cond_init
   tis_cond_signal



[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]