]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Doc: add description of cond signal without mutex lock.
authorPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 18 Apr 2025 18:37:12 +0000 (20:37 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 18 Apr 2025 18:37:12 +0000 (20:37 +0200)
helgrind/docs/hg-manual.xml

index 6ec8caa3f4bd2bcb19f60a9567f00c5be9e9cc0f..398fd73a70ae9571d3f8acb0a6f5c90cd292ed2d 100644 (file)
@@ -141,6 +141,15 @@ are:</para>
 <para>Checks pertaining to the validity of mutexes are generally also
 performed for reader-writer locks.</para>
 
+<para>Signalling or broadcasting a condition variable when the
+associated mutex is unlocked is not strictly an error. The resulting
+thread scheduling may be unpredictable if the mutex is not held.
+The option  <computeroutput>--check-cond-signal-mutex=yes|no</computeroutput>
+turns on checking for this situation. This kind of error is
+categorised as 'dubious'. The check is not turned on by default
+because some standard C and C++ libraries use condition
+signals/broadcasts with the associated mutex unlocked.</para>
+
 <para>Various kinds of this-can't-possibly-happen events are also
 reported.  These usually indicate bugs in the system threading
 library.</para>