Bug 1885489 - Part 9: Add SnapshotIterator::readObject(). r=iain
[gecko.git] / docs / nspr / reference / pr_cnotify.rst
blobd3c5163a816c3eafd6e9bf2d3ab150edcdaa8896
1 PR_CNotify
2 ==========
4 Notify a thread waiting on a change in the state of monitored data.
7 Syntax
8 ------
10 .. code::
12    #include <prcmon.h>
14    PRStatus PR_CNotify(void *address);
17 Parameter
18 ~~~~~~~~~
20 The function has the following parameter:
22 ``address``
23    The address of the monitored object. The calling thread must be in
24    the monitor defined by the value of the address.
27 Returns
28 ~~~~~~~
30  - :ref:`PR_SUCCESS` indicates that the calling thread is the holder of the
31    mutex for the monitor referred to by the address parameter.
32  - :ref:`PR_FAILURE` indicates that the monitor has not been entered by the
33    calling thread.
36 Description
37 -----------
39 Using the value specified in the ``address`` parameter to find a monitor
40 in the monitor cache, :ref:`PR_CNotify` notifies single a thread waiting
41 for the monitor's state to change. If a thread is waiting on the monitor
42 (having called :ref:`PR_CWait`), then that thread is made ready. As soon as
43 the thread is scheduled, it attempts to reenter the monitor.