Lines Matching refs:rwlock
23 pthread_rwlock_t rwlock; in main() local
30 r = pthread_rwlock_init(&rwlock, NULL); assert(r == 0); in main()
32 r = pthread_rwlock_wrlock(&rwlock); assert(r == 0); in main()
33 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
35 r = pthread_rwlock_trywrlock(&rwlock); assert(r == 0); in main()
36 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
39 r = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout); assert(r == 0); in main()
40 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
43 r = pthread_rwlock_rdlock(&rwlock); assert(r == 0); in main()
44 r = pthread_rwlock_rdlock(&rwlock); assert(r == 0); in main()
45 r = pthread_rwlock_rdlock(&rwlock); assert(r == 0); in main()
46 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
47 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
48 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
50 r = pthread_rwlock_tryrdlock(&rwlock); assert(r == 0); in main()
51 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
54 r = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout); assert(r == 0); in main()
55 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
58 r = pthread_rwlock_wrlock(&rwlock); assert(r == 0); in main()
59 r = pthread_rwlock_wrlock(&rwlock); assert(r != 0); in main()
60 r = pthread_rwlock_unlock(&rwlock); assert(r == 0); in main()
61 r = pthread_rwlock_destroy(&rwlock); assert(r == 0); in main()