12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #include "test.h"
- static pthread_spinlock_t lock;
- int pthread_test_spin1()
- {
- assert(pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE) == 0);
- assert(pthread_spin_lock(&lock) == 0);
- assert(pthread_spin_unlock(&lock) == 0);
- assert(pthread_spin_destroy(&lock) == 0);
- assert(pthread_spin_lock(&lock) == EINVAL);
- return 0;
- }
|