[glib/wip/mutexes: 8/58] Remove "temporary until GLib is fixed" code



commit f088250e62402fe54b3323052f9723c3419c9961
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Sep 17 18:30:07 2011 -0400

    Remove "temporary until GLib is fixed" code
    
    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 |   20 --------------------
 glib/gthread-win32.c |   20 --------------------
 2 files changed, 0 insertions(+), 40 deletions(-)
---
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index 02b944f..1102630 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -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");
 }
diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
index d63864c..b826918 100644
--- a/glib/gthread-win32.c
+++ b/glib/gthread-win32.c
@@ -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);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]