[glib] Added clarification to mutex free functions



commit 93d40918c59981f863d31a10d9f66a2a9b3177ff
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sat Aug 1 16:46:02 2009 +0100

    Added clarification to mutex free functions
    
    Clarified that it is A Bad Idea to free a mutex when it's locked.

 docs/reference/glib/tmpl/threads.sgml |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/glib/tmpl/threads.sgml b/docs/reference/glib/tmpl/threads.sgml
index 3ee9d61..58c62bd 100644
--- a/docs/reference/glib/tmpl/threads.sgml
+++ b/docs/reference/glib/tmpl/threads.sgml
@@ -693,6 +693,12 @@ called, and, in that case, will do nothing.
 Destroys @mutex.
 </para>
 
+<note>
+<para>
+Calling g_mutex_free() on a locked mutex may result in undefined behaviour.
+</para>
+</note>
+
 @mutex: a #GMutex.
 
 
@@ -837,6 +843,12 @@ unbounded lifetime, i.e. objects declared 'static', but if you have a
 you should also free the #GStaticMutex.
 </para>
 
+<note>
+<para>
+Calling g_static_mutex_free() on a locked mutex may result in undefined behaviour.
+</para>
+</note>
+
 @mutex: a #GStaticMutex to be freed.
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]