Extended the comments on those functions, that are NOOPs, before

2007-06-15  Sebastian Wilhelmi  <wilhelmi@google.com>

	* docs/reference/glib/tmpl/threads.sgml: Extended the comments on
	those functions, that are NOOPs, before g_thread_init() has been
	called. (#447583)

	* glib/gthread.c (g_static_mutex_free): Clarified comment to
	remind myself, tha calling g_static_mutex_free() before
	g_thread_init() is safe.


svn path=/branches/glib-2-12/; revision=5568
This commit is contained in:
Sebastian Wilhelmi 2007-06-15 17:19:01 +00:00 committed by Sebastian Wilhelmi
parent 528be68c00
commit 25d49e43cc
3 changed files with 27 additions and 7 deletions

View File

@ -1,3 +1,13 @@
2007-06-15 Sebastian Wilhelmi <wilhelmi@google.com>
* docs/reference/glib/tmpl/threads.sgml: Extended the comments on
those functions, that are NOOPs, before g_thread_init() has been
called. (#447583)
* glib/gthread.c (g_static_mutex_free): Clarified comment to
remind myself, tha calling g_static_mutex_free() before
g_thread_init() is safe.
2007-06-15 Cody Russell <cody@jhu.edu>
Merge from trunk:

View File

@ -708,8 +708,11 @@ platforms.
</para>
<para>
All of the <function>g_static_mutex_*</function> functions can also be
used even if g_thread_init() has not yet been called.
All of the <function>g_static_mutex_*</function> functions apart from
<function>g_static_mutex_get_mutex</function> can also be used even if
g_thread_init() has not yet been called. Then they do nothing, apart
from <function>g_static_mutex_trylock</function>, which does nothing
but returning %TRUE.
</para>
<note>
@ -905,8 +908,10 @@ the following functions.
</para>
<para>
All of the <function>g_static_rec_mutex_*</function> functions can
be used even if g_thread_init() has not been called.
All of the <function>g_static_rec_mutex_*</function> functions can be
used even if g_thread_init() has not been called. Then they do
nothing, apart from <function>g_static_rec_mutex_trylock</function>,
which does nothing but returning %TRUE.
</para>
@ -963,7 +968,7 @@ functions increases the depth of @mutex and immediately returns %TRUE.
<!-- ##### FUNCTION g_static_rec_mutex_unlock ##### -->
<para>
Unlocks @mutex. Another thread can will be allowed to lock @mutex only
Unlocks @mutex. Another thread will be allowed to lock @mutex only
when it has been unlocked as many times as it had been locked
before. If @mutex is completely unlocked and another thread is blocked
in a g_static_rec_mutex_lock() call for @mutex, it will be woken and
@ -1088,7 +1093,9 @@ the following functions.
<para>
All of the <function>g_static_rw_lock_*</function> functions can be
used even if g_thread_init() has not been called.
used even if g_thread_init() has not been called. Then they do
nothing, apart from <function>g_static_rw_lock_*_trylock</function>,
which does nothing but returning %TRUE.
</para>
<note>

View File

@ -230,7 +230,10 @@ g_static_mutex_free (GStaticMutex* mutex)
g_return_if_fail (mutex);
/* The runtime_mutex is the first (or only) member of GStaticMutex,
* see both versions (of glibconfig.h) in configure.in */
* see both versions (of glibconfig.h) in configure.in. Note, that
* this variable is NULL, if g_thread_init() hasn't been called or
* if we're using the default thread implementation and it provides
* static mutexes. */
runtime_mutex = ((GMutex**)mutex);
if (*runtime_mutex)