Make the rec mutex test a little more verbose

This commit is contained in:
Matthias Clasen 2011-09-23 07:26:33 -04:00
parent bec571dc79
commit dd002113f1

View File

@ -83,7 +83,6 @@ acquire (gint nr)
{ {
if (g_test_verbose ()) if (g_test_verbose ())
g_print ("thread %p going to block on lock %d\n", self, nr); g_print ("thread %p going to block on lock %d\n", self, nr);
} }
g_rec_mutex_lock (&locks[nr]); g_rec_mutex_lock (&locks[nr]);
@ -97,6 +96,9 @@ acquire (gint nr)
g_assert (owners[nr] == self); /* hopefully this is still us... */ 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_rec_mutex_lock (&locks[nr]); /* we're recursive, after all */
g_assert (owners[nr] == self); /* hopefully this is still us... */ g_assert (owners[nr] == self); /* hopefully this is still us... */