Lines Matching defs:rwlock
30 pthread_rwlock_t rwlock;
58 fprintf(stderr, "Locking rwlock exclusively ...\n");
60 pthread_rwlock_init(&rwlock, 0);
61 pthread_rwlock_wrlock(&rwlock);
63 pthread_rwlock_unlock(&rwlock);
64 pthread_rwlock_destroy(&rwlock);
66 fprintf(stderr, "Locking rwlock shared ...\n");
68 pthread_rwlock_init(&rwlock, 0);
69 pthread_rwlock_rdlock(&rwlock);
71 pthread_rwlock_rdlock(&rwlock);
72 pthread_rwlock_unlock(&rwlock);
73 pthread_rwlock_unlock(&rwlock);
74 pthread_rwlock_destroy(&rwlock);