tor-browser

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

pr_lock.rst (717B)


      1 PR_Lock
      2 =======
      3 
      4 Locks a specified lock object.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <prlock.h>
     13 
     14   void PR_Lock(PRLock *lock);
     15 
     16 
     17 Parameter
     18 ~~~~~~~~~
     19 
     20 :ref:`PR_Lock` has one parameter:
     21 
     22 ``lock``
     23   A pointer to a lock object to be locked.
     24 
     25 
     26 Description
     27 -----------
     28 
     29 When :ref:`PR_Lock` returns, the calling thread is "in the monitor," also
     30 called "holding the monitor's lock." Any thread that attempts to acquire
     31 the same lock blocks until the holder of the lock exits the monitor.
     32 Acquiring the lock is not an interruptible operation, nor is there any
     33 timeout mechanism.
     34 
     35 :ref:`PR_Lock` is not reentrant. Calling it twice on the same thread
     36 results in undefined behavior.
     37 
     38 
     39 See Also
     40 --------
     41 
     42 - :ref:`PR_Unlock`