From 74560cdd998157c214f54f2039a0ad3ea0396796 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Sat, 30 Jan 2010 03:30:08 +0100 Subject: [PATCH] remove some lock sections in thread two_acquire_test After acquired, the caller 'owns' the thread handle and can inspect it, the associated thread is defined to be waiting for a wakeup signal (and then one shouldn't do unlocked access to the thread handle) --- tests/backend/test-threadpool.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/backend/test-threadpool.c b/tests/backend/test-threadpool.c index 682675515..5589935ce 100644 --- a/tests/backend/test-threadpool.c +++ b/tests/backend/test-threadpool.c @@ -83,17 +83,11 @@ TEST ("two-thread-acquire") "test purpose", &NOBUG_FLAG(NOBUG_ON)); - LUMIERA_CONDITION_SECTION(NOBUG_ON, &t1->signal) - { - ECHO("thread 1 state=%s", lumiera_threadstate_names[t1->state]); - CHECK(LUMIERA_THREADSTATE_IDLE == t1->state); - } + ECHO("thread 1 state=%s", lumiera_threadstate_names[t1->state]); + CHECK(LUMIERA_THREADSTATE_IDLE == t1->state); - LUMIERA_CONDITION_SECTION(NOBUG_ON, &t2->signal) - { - ECHO("thread 2 state=%s", lumiera_threadstate_names[t2->state]); - CHECK(LUMIERA_THREADSTATE_IDLE == t2->state); - } + ECHO("thread 2 state=%s", lumiera_threadstate_names[t2->state]); + CHECK(LUMIERA_THREADSTATE_IDLE == t2->state); LUMIERA_CONDITION_SECTION(NOBUG_ON, &t1->signal) {