From f7e009b00adc33631531539a2f565b0275e7a1c1 Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Tue, 8 May 2001 14:21:40 +0000 Subject: [PATCH] Clarification for g_mutex_trylock. 2001-05-08 Sebastian Wilhelmi * glib/tmpl/threads.sgml: Clarification for g_mutex_trylock. --- docs/reference/ChangeLog | 2 ++ docs/reference/glib/tmpl/threads.sgml | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 283e7d7..796575f 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -2,6 +2,8 @@ * glib/tmpl/threads.sgml, glib/glib-overrides.txt: Updated. + * glib/tmpl/threads.sgml: Clarification for g_mutex_trylock. + 2001-04-19 Sebastian Wilhelmi * glib/tmpl/hash_tables.sgml, glib/tmpl/misc_utils.sgml, diff --git a/docs/reference/glib/tmpl/threads.sgml b/docs/reference/glib/tmpl/threads.sgml index 3fbb1c3..03b3b34 100644 --- a/docs/reference/glib/tmpl/threads.sgml +++ b/docs/reference/glib/tmpl/threads.sgml @@ -550,7 +550,7 @@ called and will do nothing then. #GMutex is not recursive, i.e. a thread will deadlock, if it already -has locked the #GMutex while calling g_mutex_lock(). Use +has locked @mutex while calling g_mutex_lock(). Use #GStaticRecMutex instead, if you need recursive mutexes. @@ -571,6 +571,14 @@ This function can also be used, if g_thread_init() has not yet been called and will immediately return TRUE then. + + +#GMutex is not recursive, i.e. g_mutex_trylock() will return FALSE, +if the current thread already has locked @mutex. Use +#GStaticRecMutex instead, if you need recursive mutexes. + + + @mutex: a #GMutex @Returns: TRUE, if @mutex could be locked -- 2.7.4