summaryrefslogtreecommitdiff
path: root/tests/spin3.c
diff options
context:
space:
mode:
authorrpj <rpj>2001-07-06 18:16:50 +0000
committerrpj <rpj>2001-07-06 18:16:50 +0000
commit06974b302eaf8f08382e6e786aea53f420c12222 (patch)
tree1b574a41dacc634a105a74127b2dac30a60bda13 /tests/spin3.c
parent7a3104dc65b469cbb9c88b6a9c7b7bea4126a43e (diff)
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.
Diffstat (limited to 'tests/spin3.c')
-rw-r--r--tests/spin3.c2
1 files changed, 1 insertions, 1 deletions
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;