Remove "temporary until GLib is fixed" code
authorRyan Lortie <desrt@desrt.ca>
Sat, 17 Sep 2011 22:30:07 +0000 (18:30 -0400)
committerRyan Lortie <desrt@desrt.ca>
Wed, 21 Sep 2011 20:06:53 +0000 (16:06 -0400)
The original GMutex/GCond rework patch introduced some temporary code to
cope with GLib's old approach to thread initialisation.  These are no
longer required.

glib/gthread-posix.c
glib/gthread-win32.c

index 02b944f..1102630 100644 (file)
@@ -82,10 +82,6 @@ g_mutex_lock (GMutex *mutex)
 {
   gint status;
 
-  /* temporary until we fix libglib */
-  if (mutex == NULL)
-    return;
-
   if G_UNLIKELY ((status = pthread_mutex_lock (&mutex->impl)) != 0)
     g_thread_abort (status, "pthread_mutex_lock");
 }
@@ -95,10 +91,6 @@ g_mutex_unlock (GMutex *mutex)
 {
   gint status;
 
-  /* temporary until we fix libglib */
-  if (mutex == NULL)
-    return;
-
   if G_UNLIKELY ((status = pthread_mutex_unlock (&mutex->impl)) != 0)
     g_thread_abort (status, "pthread_mutex_lock");
 }
@@ -108,10 +100,6 @@ g_mutex_trylock (GMutex *mutex)
 {
   gint status;
 
-  /* temporary until we fix libglib */
-  if (mutex == NULL)
-    return TRUE;
-
   if G_LIKELY ((status = pthread_mutex_trylock (&mutex->impl)) == 0)
     return TRUE;
 
@@ -156,10 +144,6 @@ g_cond_signal (GCond *cond)
 {
   gint status;
 
-  /* temporary until we fix libglib */
-  if (cond == NULL)
-    return;
-
   if G_UNLIKELY ((status = pthread_cond_signal (&cond->impl)) != 0)
     g_thread_abort (status, "pthread_cond_signal");
 }
@@ -169,10 +153,6 @@ g_cond_broadcast (GCond *cond)
 {
   gint status;
 
-  /* temporary until we fix libglib */
-  if (cond == NULL)
-    return;
-
   if G_UNLIKELY ((status = pthread_cond_broadcast (&cond->impl)) != 0)
     g_thread_abort (status, "pthread_cond_broadcast");
 }
index d63864c..b826918 100644 (file)
@@ -136,30 +136,18 @@ g_mutex_clear (GMutex *mutex)
 void
 g_mutex_lock (GMutex *mutex)
 {
-  /* temporary until we fix libglib */
-  if (mutex == NULL)
-    return;
-
   g_thread_impl_vtable.AcquireSRWLockExclusive (mutex);
 }
 
 gboolean
 g_mutex_trylock (GMutex *mutex)
 {
-  /* temporary until we fix libglib */
-  if (mutex == NULL)
-    return TRUE;
-
   return g_thread_impl_vtable.TryAcquireSRWLockExclusive (mutex);
 }
 
 void
 g_mutex_unlock (GMutex *mutex)
 {
-  /* temporary until we fix libglib */
-  if (mutex == NULL)
-    return;
-
   g_thread_impl_vtable.ReleaseSRWLockExclusive (mutex);
 }
 
@@ -180,20 +168,12 @@ g_cond_clear (GCond *cond)
 void
 g_cond_signal (GCond *cond)
 {
-  /* temporary until we fix libglib */
-  if (cond == NULL)
-    return;
-
   g_thread_impl_vtable.WakeConditionVariable (cond);
 }
 
 void
 g_cond_broadcast (GCond *cond)
 {
-  /* temporary until we fix libglib */
-  if (cond == NULL)
-    return;
-
   g_thread_impl_vtable.WakeAllConditionVariable (cond);
 }