Commit 91745697 authored by Matthias Clasen's avatar Matthias Clasen

Also use trylock in the bitlock tests

parent ce7463a8
......@@ -57,7 +57,13 @@ acquire (int nr)
self = g_thread_self ();
g_bit_lock (&locks[nr], bits[nr]);
if (!g_bit_trylock (&locks[nr], bits[nr]))
{
if (g_test_verbose ())
g_print ("thread %p going to block on lock %d\n", self, nr);
g_bit_lock (&locks[nr], bits[nr]);
}
g_assert (owners[nr] == NULL); /* hopefully nobody else is here */
owners[nr] = self;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment