tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pr_cnotify.rst (1018B)


      1 PR_CNotify
      2 ==========
      3 
      4 Notify a thread waiting on a change in the state of monitored data.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <prcmon.h>
     13 
     14   PRStatus PR_CNotify(void *address);
     15 
     16 
     17 Parameter
     18 ~~~~~~~~~
     19 
     20 The function has the following parameter:
     21 
     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.
     25 
     26 
     27 Returns
     28 ~~~~~~~
     29 
     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.
     34 
     35 
     36 Description
     37 -----------
     38 
     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.