summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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;
}