From aac54e89d7945f3f4557067b1d4a1cd8853d369f Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 2 Jul 2011 06:35:21 +0000 Subject: See the ChangeLogs --- tests/spin3.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/spin3.c') diff --git a/tests/spin3.c b/tests/spin3.c index fa16b35..bbf8bfb 100644 --- a/tests/spin3.c +++ b/tests/spin3.c @@ -64,7 +64,11 @@ main() assert(pthread_spin_lock(&spin) == 0); assert(pthread_create(&t, NULL, unlocker, (void*)0) == 0); assert(pthread_join(t, NULL) == 0); - assert(pthread_spin_unlock(&spin) == EPERM); + /* + * Our spinlocks don't record the owner thread so any thread can unlock the spinlock, + * but nor is it an error for any thread to unlock a spinlock that is not locked. + */ + assert(pthread_spin_unlock(&spin) == 0); assert(pthread_spin_destroy(&spin) == 0); assert(wasHere == 2); -- cgit v1.2.3