tor-browser

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

pr_exitmonitor.rst (884B)


      1 PR_ExitMonitor
      2 ==============
      3 
      4 Decrements the entry count associated with a specified monitor and, if
      5 the entry count reaches zero, releases the monitor's lock.
      6 
      7 
      8 Syntax
      9 ------
     10 
     11 .. code::
     12 
     13   #include <prmon.h>
     14 
     15   PRStatus PR_ExitMonitor(PRMonitor *mon);
     16 
     17 
     18 Parameter
     19 ~~~~~~~~~
     20 
     21 The function has the following parameter:
     22 
     23 ``mon``
     24   A reference to an existing structure of type :ref:`PRMonitor`. The
     25   monitor object referenced must be one for which the calling thread
     26   currently holds the lock.
     27 
     28 
     29 Returns
     30 ~~~~~~~
     31 
     32 The function returns one of the following values:
     33 
     34 -  If successful, ``PR_SUCCESS``.
     35 -  If unsuccessful (the calling thread has not entered the monitor),
     36   ``PR_FAILURE``.
     37 
     38 
     39 Description
     40 -----------
     41 
     42 If the decremented entry count is zero, :ref:`PR_ExitMonitor` releases the
     43 monitor's lock. Threads that were blocked trying to enter the monitor
     44 will be rescheduled.