summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2011-09-17 19:33:30 -0400
committerRyan Lortie <desrt@desrt.ca>2011-09-21 16:06:53 -0400
commitc33cd007398cfc81a9405b95280e99a231f58ff8 (patch)
treebcd76d393f98a4a87f2ede86a6fd9426d51fe174 /tests
parent1da913a7a3f120d7097a7474f7cccbeeb1a8383c (diff)
Stop using GStaticMutex in two testcases
Diffstat (limited to 'tests')
-rw-r--r--tests/thread-test.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/thread-test.c b/tests/thread-test.c
index 709c38718..fa4f02bfb 100644
--- a/tests/thread-test.c
+++ b/tests/thread-test.c
@@ -110,25 +110,25 @@ test_g_static_rec_mutex (void)
static GStaticPrivate test_g_static_private_private1 = G_STATIC_PRIVATE_INIT;
static GStaticPrivate test_g_static_private_private2 = G_STATIC_PRIVATE_INIT;
-static GStaticMutex test_g_static_private_mutex = G_STATIC_MUTEX_INIT;
+static GMutex test_g_static_private_mutex = G_MUTEX_INIT;
static guint test_g_static_private_counter = 0;
static guint test_g_static_private_ready = 0;
static gpointer
test_g_static_private_constructor (void)
{
- g_static_mutex_lock (&test_g_static_private_mutex);
+ g_mutex_lock (&test_g_static_private_mutex);
test_g_static_private_counter++;
- g_static_mutex_unlock (&test_g_static_private_mutex);
+ g_mutex_unlock (&test_g_static_private_mutex);
return g_new (guint,1);
}
static void
test_g_static_private_destructor (gpointer data)
{
- g_static_mutex_lock (&test_g_static_private_mutex);
+ g_mutex_lock (&test_g_static_private_mutex);
test_g_static_private_counter--;
- g_static_mutex_unlock (&test_g_static_private_mutex);
+ g_mutex_unlock (&test_g_static_private_mutex);
g_free (data);
}
@@ -162,9 +162,9 @@ test_g_static_private_thread (gpointer data)
g_assert (number == *private1);
g_assert (number * 2 == *private2);
}
- g_static_mutex_lock (&test_g_static_private_mutex);
+ g_mutex_lock (&test_g_static_private_mutex);
test_g_static_private_ready++;
- g_static_mutex_unlock (&test_g_static_private_mutex);
+ g_mutex_unlock (&test_g_static_private_mutex);
/* Busy wait is not nice but that's just a test */
while (test_g_static_private_ready != 0)