From 06974b302eaf8f08382e6e786aea53f420c12222 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 6 Jul 2001 18:16:50 +0000 Subject: Spinlocks and barriers fixed and working. Beta level. * spin.c: Revamped and working; included static initialiser. * barrier.c: Likewise. * condvar.c: Macro constant change; inline auto init routine. * mutex.c: Likewise. * rwlock.c: Likewise. * private.c: Add support for spinlock initialiser. * global.c: Likewise. * implement.h: Likewise. * pthread.h (PTHREAD_SPINLOCK_INITIALIZER): Fix typo. tests/ChangeLog: * spin3.c: Changed test and fixed. * spin4.c: Fixed. * barrier3.c: Fixed. * barrier4.c: Fixed. --- tests/spin3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/spin3.c') diff --git a/tests/spin3.c b/tests/spin3.c index 8b383de..acd6e75 100644 --- a/tests/spin3.c +++ b/tests/spin3.c @@ -26,7 +26,6 @@ int main() { pthread_t t; - pthread_spinattr_t ma; wasHere = 0; assert(pthread_spin_init(&spin, PTHREAD_PROCESS_PRIVATE) == 0); @@ -34,6 +33,7 @@ main() assert(pthread_create(&t, NULL, unlocker, (void *) 0) == 0); assert(pthread_join(t, NULL) == 0); assert(pthread_spin_unlock(&spin) == EPERM); + assert(pthread_spin_destroy(&spin) == 0); assert(wasHere == 2); return 0; -- cgit v1.2.3