prevent race covered by g_once_init_enter(), by checking for previous
authorTim Janik <timj@imendio.com>
Tue, 14 Aug 2007 00:05:52 +0000 (00:05 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 14 Aug 2007 00:05:52 +0000 (00:05 +0000)
commitd5c437081366ba9617c9a23a09d167aede52a8b9
tree902d15f49200c90cb1e64adbb874efae80b5eaae
parentdb68b8efa9b6aff53a640d82a0bf7ed6f819c4f0
prevent race covered by g_once_init_enter(), by checking for previous

Tue Aug 14 02:06:10 2007  Tim Janik  <timj@imendio.com>

        * glib/gthread.c (g_once_init_enter_impl): prevent race covered
        by g_once_init_enter(), by checking for previous initializations
        before entering initialisation branch.

        * tests/onceinit.c: added multi-thread/multi-initializer stress test
        using unoptimized g_once_init_enter_impl().

svn path=/trunk/; revision=5701
ChangeLog
glib/gthread.c
glib/gthread.h
tests/onceinit.c