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


pthread_cond_broadcast

Wakes all threads that are waiting on a condition variable.

Syntax

pthread_cond_broadcast(
                       cond );
 


Argument Data Type Access

cond opaque pthread_cond_t read


C Binding

int
pthread_cond_broadcast (
pthread_cond_t *cond);

Arguments

cond
Condition variable broadcast.

Description

This routine wakes all threads waiting on a condition variable. Calling this routine implies that data guarded by the associated mutex has changed so that it might be possible for one or more waiting threads to proceed. If any waiting thread might be able to proceed, call pthread_cond_signal.

You can call this routine whether the associated mutex is locked or not.

Return Values

If an error condition occurs, this routine returns -1 and sets errno to the corresponding error value. Possible return values are as follows:
Return  Error         Description

0 Successful completion. -1 [EINVAL] The value specified by cond is invalid.



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