summaryrefslogtreecommitdiff
path: root/tests/spin1.c
diff options
context:
space:
mode:
authorrpj <rpj>2001-07-05 17:04:39 +0000
committerrpj <rpj>2001-07-05 17:04:39 +0000
commit7a3104dc65b469cbb9c88b6a9c7b7bea4126a43e (patch)
tree524cc0af0d3fa262c2412cdda269185059b33c33 /tests/spin1.c
parentec27b9c8303540de6b5a8ebefee114f3cdd436f0 (diff)
Fixups to last commit.
Diffstat (limited to 'tests/spin1.c')
-rw-r--r--tests/spin1.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/spin1.c b/tests/spin1.c
index e9e5731..347cf18 100644
--- a/tests/spin1.c
+++ b/tests/spin1.c
@@ -8,24 +8,20 @@
#include "test.h"
-pthread_spinlock_t lock = NULL;
+pthread_spinlock_t lock;
int
main()
{
- assert(lock == NULL);
-
assert(pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE) == 0);
- assert(lock != NULL);
-
assert(pthread_spin_lock(&lock) == 0);
assert(pthread_spin_unlock(&lock) == 0);
assert(pthread_spin_destroy(&lock) == 0);
- assert(lock == NULL);
+ assert(pthread_spin_lock(&lock) == EINVAL);
return 0;
}