[glib] Make the rec mutex test a little more verbose



commit dd002113f1ce4114f6f39b562f895aab6b47c8dc
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Sep 23 07:26:33 2011 -0400

    Make the rec mutex test a little more verbose

 glib/tests/rec-mutex.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/glib/tests/rec-mutex.c b/glib/tests/rec-mutex.c
index 055ab07..9ade360 100644
--- a/glib/tests/rec-mutex.c
+++ b/glib/tests/rec-mutex.c
@@ -83,7 +83,6 @@ acquire (gint nr)
     {
       if (g_test_verbose ())
         g_print ("thread %p going to block on lock %d\n", self, nr);
-
     }
 
   g_rec_mutex_lock (&locks[nr]);
@@ -97,6 +96,9 @@ acquire (gint nr)
 
   g_assert (owners[nr] == self);   /* hopefully this is still us... */
 
+  if (g_test_verbose ())
+    g_print ("thread %p recursively taking lock %d\n", self, nr);
+
   g_rec_mutex_lock (&locks[nr]);  /* we're recursive, after all */
 
   g_assert (owners[nr] == self);   /* hopefully this is still us... */



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