Lines Matching defs:type
51 print_lock(const char *operation, isc_rwlock_t *rwl, isc_rwlocktype_t type) {
58 (type == isc_rwlocktype_read ?
63 (rwl->type == isc_rwlocktype_read ?
101 rwl->type = isc_rwlocktype_read;
241 isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
248 ISC_MSG_PRELOCK, "prelock"), rwl, type);
251 if (type == isc_rwlocktype_read) {
344 ISC_MSG_POSTLOCK, "postlock"), rwl, type);
351 isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
358 ISC_MSG_PRELOCK, "prelock"), rwl, type);
361 if (type == isc_rwlocktype_read) {
406 ISC_MSG_POSTLOCK, "postlock"), rwl, type);
464 isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
471 ISC_MSG_PREUNLOCK, "preunlock"), rwl, type);
474 if (type == isc_rwlocktype_read) {
528 rwl, type);
537 doit(isc_rwlock_t *rwl, isc_rwlocktype_t type, isc_boolean_t nonblock) {
548 ISC_MSG_PRELOCK, "prelock"), rwl, type);
551 if (type == isc_rwlocktype_read) {
557 (rwl->type == isc_rwlocktype_read &&
561 rwl->type = isc_rwlocktype_read;
580 rwl->type = isc_rwlocktype_write;
598 ISC_MSG_POSTLOCK, "postlock"), rwl, type);
607 isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
608 return (doit(rwl, type, ISC_FALSE));
612 isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
613 return (doit(rwl, type, ISC_TRUE));
622 REQUIRE(rwl->type == isc_rwlocktype_read);
629 rwl->type = isc_rwlocktype_write;
642 REQUIRE(rwl->type == isc_rwlocktype_write);
645 rwl->type = isc_rwlocktype_read;
661 isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
665 REQUIRE(rwl->type == type);
667 UNUSED(type);
671 ISC_MSG_PREUNLOCK, "preunlock"), rwl, type);
678 rwl->type = rwl->original;
681 if (rwl->type == isc_rwlocktype_read) {
684 rwl->type = isc_rwlocktype_write;
697 rwl->type = isc_rwlocktype_read;
713 rwl, type);
733 rwl->type = isc_rwlocktype_read;
741 isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
744 if (type == isc_rwlocktype_read) {
745 if (rwl->type != isc_rwlocktype_read && rwl->active != 0)
747 rwl->type = isc_rwlocktype_read;
752 rwl->type = isc_rwlocktype_write;
759 isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
760 return (isc_rwlock_lock(rwl, type));
768 REQUIRE(rwl->type == isc_rwlocktype_read);
773 rwl->type = isc_rwlocktype_write;
783 REQUIRE(rwl->type == isc_rwlocktype_write);
786 rwl->type = isc_rwlocktype_read;
790 isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
792 REQUIRE(rwl->type == type);
794 UNUSED(type);