From: Bart Van Assche Date: Mon, 28 Jul 2008 14:55:38 +0000 (+0000) Subject: Attempted to make DRD documentation compatible with pdfxmltex. Added note about g_thr... X-Git-Tag: svn/VALGRIND_3_4_0~304 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5114b9be419c005081deef5116e1d3b89b3becdb;p=thirdparty%2Fvalgrind.git Attempted to make DRD documentation compatible with pdfxmltex. Added note about g_thread_init(). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8465 --- diff --git a/drd/docs/drd-manual.xml b/drd/docs/drd-manual.xml index e3bd112948..e1874299a6 100644 --- a/drd/docs/drd-manual.xml +++ b/drd/docs/drd-manual.xml @@ -806,106 +806,15 @@ output reports that the lock acquired at line 51 in source file -There is one message that needs further explanation, namely sending a -signal to a condition variable while no lock is held on the mutex -associated with the signal. Consider e.g. the example . In this example the -code in thread 1 passes if flag != 0, or waits -until it has been signaled by thread 2. If however the code of thread -1 is scheduled after the pthread_mutex_unlock() -call in thread 2 and before thread 2 calls -pthread_cond_signal(), thread 1 will block -indefinitely. The code in the example never blocks indefinitely. - - - -Because most calls of pthread_cond_signal() or +Regarding the message DRD prints about sending a signal to a condition +variable while no lock is held on the mutex associated with the +signal: DRD reports this because some calls of +pthread_cond_signal() or pthread_cond_broadcast() while no lock is held on -the mutex associated with the condition variable are racy, by default -DRD reports such calls. +the mutex associated with the condition variable introduce subtle race +conditions. - -Racy use of pthread_cond_wait() - -
- - -Correct use of pthread_cond_wait() - -
- @@ -998,8 +907,16 @@ before Valgrind's header files are present. GNOME applications use the threading primitives provided by the -glib library. This library is built -on top of POSIX threads, and is hence directly supported by DRD. +glib and +gthread libraries. These libraries +are built on top of POSIX threads, and hence are directly supported by +DRD. Please keep in mind that you have to call +g_thread_init() before creating any threads, or +DRD will report several data races on glib functions. See also the +GLib +Reference Manual for more information about +g_thread_init(). @@ -1025,11 +942,8 @@ by KDE 4. If possible, use Qt4 instead of Qt3. Qt3 is no longer supported, and there are known problems with multithreading support in Qt3. As an example, using QString objects in more than one thread will trigger race reports (this has been confirmed by Trolltech -- see also -Trolltech task (bug report) number 206152. - +Trolltech task #206152).