diff options
author | rpj <rpj> | 2011-07-02 06:35:21 +0000 |
---|---|---|
committer | rpj <rpj> | 2011-07-02 06:35:21 +0000 |
commit | aac54e89d7945f3f4557067b1d4a1cd8853d369f (patch) | |
tree | 41f794bea892c1e01b679b127f6dcd0e683c9219 /tests/spin3.c | |
parent | e516576e75527fb763e800e61dd024461141ec14 (diff) |
See the ChangeLogs
Diffstat (limited to 'tests/spin3.c')
-rw-r--r-- | tests/spin3.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |