Rework GMutex and GCond APIs
authorRyan Lortie <desrt@desrt.ca>
Fri, 16 Sep 2011 22:05:23 +0000 (18:05 -0400)
committerRyan Lortie <desrt@desrt.ca>
Wed, 21 Sep 2011 19:55:36 +0000 (15:55 -0400)
commit80730bc75ca8b0ad71f1372c9652bee39391244e
treeece11bb4cee663ff3b17201f6d6d5ede4e1f2ba8
parentc6f84faa17227da437eeceb58ce79334ffdfdb57
Rework GMutex and GCond APIs

Do a substantial rework of the GMutex and GCond APIs.

 - remove all of the macro indirection hackery which is no longer needed
   since we dropped support for switchable thread implementations

 - expose the structure types and add G_MUTEX_INIT and G_COND_INIT
   static initialiser macros

 - add g_mutex_init() and g_mutex_clear() for use when embedding GMutex
   into another structure type and do the same for GCond as well

 - avoid infinite recursion hazards by ensuring that neither GCond or
   GMutex ever calls back into any other part of GLib

 - substantially rework the Windows implementation of GCond and GMutex
   to use the SRWLock and CONDITION_VARIABLE APIs present on Windows
   2008/Vista and later, emulating these APIs on XP
glib/glib.symbols
glib/gthread-posix.c
glib/gthread-win32.c
glib/gthread.h
glib/gutils.c