From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- docs/nspr/reference/pr_notifycondvar.rst | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 docs/nspr/reference/pr_notifycondvar.rst (limited to 'docs/nspr/reference/pr_notifycondvar.rst') diff --git a/docs/nspr/reference/pr_notifycondvar.rst b/docs/nspr/reference/pr_notifycondvar.rst new file mode 100644 index 0000000000..e7289d9b06 --- /dev/null +++ b/docs/nspr/reference/pr_notifycondvar.rst @@ -0,0 +1,49 @@ +PR_NotifyCondVar +================ + +Notifies a condition variable of a change in its associated monitored +data. + + +Syntax +------ + +.. code:: + + #include + + PRStatus PR_NotifyCondVar(PRCondVar *cvar); + + +Parameter +~~~~~~~~~ + +:ref:`PR_NotifyCondVar` has one parameter: + +``cvar`` + The condition variable to notify. + + +Returns +~~~~~~~ + +The function returns one of the following values: + +- If successful, ``PR_SUCCESS``. +- If unsuccessful (for example, if the caller has not locked the lock + associated with the condition variable), ``PR_FAILURE``. + + +Description +----------- + +The calling thread must hold the lock that protects the condition, as +well as the invariants that are tightly bound to the condition. + +Notification of a condition variable signals a change of state in some +monitored data. When the notification occurs, the runtime promotes a +thread that is waiting on the condition variable to a ready state. If +more than one thread is waiting, the selection of which thread gets +promoted cannot be predicted. This implies that all threads waiting on a +single condition variable must have the same semantics. If no thread is +waiting on the condition variable, the notify operation is a no-op. -- cgit v1.2.3