Fixes for #101264 and #99372:
authorSebastian Wilhelmi <seppi@seppi.de>
Fri, 14 Feb 2003 15:08:46 +0000 (15:08 +0000)
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>
Fri, 14 Feb 2003 15:08:46 +0000 (15:08 +0000)
commit8e91cf9eb98da826abc1384418b5e9a4401048b8
treed040da27787fea299564b358c0672f8970f0fb2d
parentf0e22eaadfe733d205175e899db80e90126662ac
Fixes for #101264 and #99372:

2003-02-14  Sebastian Wilhelmi  <seppi@seppi.de>

Fixes for #101264 and #99372:

* glib/gconvert.h, glib/gmain.c, glib/gmem.c, glib/gmessages.c,
glib/grand.c: Include gthreadinit.h and rename the thread
initialization functions a bit and let them start with _, so that
later we can stop exporting them.

* glib/gmem.c, glib/gmessages.c: Move the g_private_new() calls to
new functions. They have to be called after setting
g_threads_got_initialized to TRUE (see #101264).

* glib/gthread.c: Include gthreadinit.h. Renamed g_mutex_init() to
g_thread_init_glib(). Call the thread initialization functions
(which are not allowed to call g_private_new), then set
g_threads_got_initialized to TRUE, then call the other thread
initialization functions (which must not call anything but
g_private_new()).

* glib/gthreadinit.h: New private header to cleanly declare all
thread initialization functions.

* gthread/gthread-impl.c: Include gthreadinit.h. In
g_thread_init() just call g_thread_init_glib(), which in turn calls the
other functions (see #99372).

* glib/Makefile.am: Added gthreadinit.h.
15 files changed:
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/Makefile.am
glib/gconvert.c
glib/gmain.c
glib/gmem.c
glib/gmessages.c
glib/grand.c
glib/gthread.c
glib/gthreadinit.h [new file with mode: 0644]
gthread/gthread-impl.c