summaryrefslogtreecommitdiffstats
path: root/docs/nspr/reference/pr_notifyallcondvar.rst
blob: aa73167c99a6937ea13db2888c5359b85e94dd13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
PR_NotifyAllCondVar
===================

Notifies all of the threads waiting on a specified condition variable.


Syntax
------

.. code::

   #include <prcvar.h>

   PRStatus PR_NotifyAllCondVar(PRCondVar *cvar);


Returns
~~~~~~~

The function returns one of the following values:

-  If successful, ``PR_SUCCESS``.
-  If unsuccessful (for example, if the caller has not locked the lock
   associated with the condition variable), ``PR_FAILURE``.


Description
-----------

The calling thread must hold the lock that protects the condition, as
well as the invariants that are tightly bound to the condition.

A call to :ref:`PR_NotifyAllCondVar` causes all of the threads waiting on
the specified condition variable to be promoted to a ready state. If no
threads are waiting, the operation is no-op.