Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/docs/nspr/reference/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 717 B image not shown  

 pr_lock.rst  Interaktion und
Portierbarkeitunbekannt

 
Spracherkennung für: .rst vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

PR_Lock
=======

Locks a specified lock object.


Syntax
------

.. code::

   #include <prlock.h>

   void PR_Lock(PRLock *lock);


Parameter
~~~~~~~~~

:ref:`PR_Lock` has one parameter:

``lock``
   A pointer to a lock object to be locked.


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

When :ref:`PR_Lock` returns, the calling thread is "in the monitor," also
called "holding the monitor's lock." Any thread that attempts to acquire
the same lock blocks until the holder of the lock exits the monitor.
Acquiring the lock is not an interruptible operation, nor is there any
timeout mechanism.

:ref:`PR_Lock` is not reentrant. Calling it twice on the same thread
results in undefined behavior.


See Also
--------

 - :ref:`PR_Unlock`

[Konzepte0.20Was zu einem Entwurf gehörtWie die Entwicklung von Software durchgeführt wird2026-09-27]