pr_notifyallcondvar.rst (802B)
1 PR_NotifyAllCondVar 2 =================== 3 4 Notifies all of the threads waiting on a specified condition variable. 5 6 7 Syntax 8 ------ 9 10 .. code:: 11 12 #include <prcvar.h> 13 14 PRStatus PR_NotifyAllCondVar(PRCondVar *cvar); 15 16 17 Returns 18 ~~~~~~~ 19 20 The function returns one of the following values: 21 22 - If successful, ``PR_SUCCESS``. 23 - If unsuccessful (for example, if the caller has not locked the lock 24 associated with the condition variable), ``PR_FAILURE``. 25 26 27 Description 28 ----------- 29 30 The calling thread must hold the lock that protects the condition, as 31 well as the invariants that are tightly bound to the condition. 32 33 A call to :ref:`PR_NotifyAllCondVar` causes all of the threads waiting on 34 the specified condition variable to be promoted to a ready state. If no 35 threads are waiting, the operation is no-op.