Lines Matching defs:lock
29 isc_rwlock_t lock;
38 RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_read) ==
40 printf("%s got READ lock\n", message);
42 printf("%s giving up READ lock\n", message);
43 RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_read) ==
45 RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_read) ==
47 printf("%s got READ lock\n", message);
49 printf("%s giving up READ lock\n", message);
50 RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_read) ==
52 RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_write) ==
54 printf("%s got WRITE lock\n", message);
56 printf("%s giving up WRITE lock\n", message);
57 RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_write) ==
69 RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_write) ==
71 printf("%s got WRITE lock\n", message);
73 printf("%s giving up WRITE lock\n", message);
74 RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_write) ==
76 RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_write) ==
78 printf("%s got WRITE lock\n", message);
80 printf("%s giving up WRITE lock\n", message);
81 RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_write) ==
83 RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_read) ==
85 printf("%s got READ lock\n", message);
87 printf("%s giving up READ lock\n", message);
88 RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_read) ==
109 RUNTIME_CHECK(isc_rwlock_init(&lock, 5, 10) == ISC_R_SUCCESS);
128 isc_rwlock_destroy(&lock);