#include <isc/condition.h>
#include <isc/lang.h>
#include <isc/platform.h>
#include <isc/types.h>
Go to the source code of this file.
Data Structures | |
struct | isc_rwlock |
Defines | |
#define | ISC_RWLOCK_H 1 |
Enumerations | |
enum | isc_rwlocktype_t { isc_rwlocktype_none = 0, isc_rwlocktype_read, isc_rwlocktype_write } |
Functions | |
isc_result_t | isc_rwlock_init (isc_rwlock_t *rwl, unsigned int read_quota, unsigned int write_quota) |
isc_result_t | isc_rwlock_lock (isc_rwlock_t *rwl, isc_rwlocktype_t type) |
isc_result_t | isc_rwlock_trylock (isc_rwlock_t *rwl, isc_rwlocktype_t type) |
isc_result_t | isc_rwlock_unlock (isc_rwlock_t *rwl, isc_rwlocktype_t type) |
isc_result_t | isc_rwlock_tryupgrade (isc_rwlock_t *rwl) |
void | isc_rwlock_downgrade (isc_rwlock_t *rwl) |
void | isc_rwlock_destroy (isc_rwlock_t *rwl) |
Definition in file rwlock.h.
enum isc_rwlocktype_t |
isc_result_t isc_rwlock_init | ( | isc_rwlock_t * | rwl, | |
unsigned int | read_quota, | |||
unsigned int | write_quota | |||
) |
Definition at line 724 of file rwlock.c.
References isc_rwlock::active, ISC_R_SUCCESS, isc_rwlocktype_read, isc_rwlock::magic, REQUIRE, RWLOCK_MAGIC, isc_rwlock::type, and UNUSED.
Referenced by create_stats(), dns_dbtable_create(), dns_fwdtable_create(), dns_keytable_create(), dns_ntatable_create(), dns_rbtdb_create(), dns_resolver_create(), dns_tsigkeyring_create(), dns_zonemgr_create(), dns_zt_create(), ISC_LIST(), and main().
isc_result_t isc_rwlock_lock | ( | isc_rwlock_t * | rwl, | |
isc_rwlocktype_t | type | |||
) |
Definition at line 740 of file rwlock.c.
References isc_rwlock::active, ISC_R_LOCKBUSY, ISC_R_SUCCESS, isc_rwlocktype_read, isc_rwlocktype_write, REQUIRE, isc_rwlock::type, and VALID_RWLOCK.
Referenced by copy_counters(), decrementcounter(), incrementcounter(), isc_rwlock_trylock(), isc_stats_set(), and keythatsigned().
isc_result_t isc_rwlock_trylock | ( | isc_rwlock_t * | rwl, | |
isc_rwlocktype_t | type | |||
) |
Definition at line 758 of file rwlock.c.
References isc_rwlock_lock().
Referenced by decrement_reference().
isc_result_t isc_rwlock_unlock | ( | isc_rwlock_t * | rwl, | |
isc_rwlocktype_t | type | |||
) |
Definition at line 789 of file rwlock.c.
References isc_rwlock::active, INSIST, ISC_R_SUCCESS, REQUIRE, isc_rwlock::type, UNUSED, and VALID_RWLOCK.
Referenced by copy_counters(), decrementcounter(), incrementcounter(), isc_stats_set(), and keythatsigned().
isc_result_t isc_rwlock_tryupgrade | ( | isc_rwlock_t * | rwl | ) |
Definition at line 763 of file rwlock.c.
References isc_rwlock::active, ISC_R_LOCKBUSY, ISC_R_SUCCESS, isc_rwlocktype_read, isc_rwlocktype_write, REQUIRE, isc_rwlock::type, and VALID_RWLOCK.
Referenced by decrement_reference().
void isc_rwlock_downgrade | ( | isc_rwlock_t * | rwl | ) |
Definition at line 779 of file rwlock.c.
References isc_rwlock::active, isc_rwlocktype_read, isc_rwlocktype_write, REQUIRE, isc_rwlock::type, and VALID_RWLOCK.
Referenced by decrement_reference().
void isc_rwlock_destroy | ( | isc_rwlock_t * | rwl | ) |
Definition at line 802 of file rwlock.c.
References isc_rwlock::active, isc_rwlock::magic, and REQUIRE.
Referenced by dbtable_free(), destroy(), destroyring(), dns_fwdtable_destroy(), dns_keytable_detach(), dns_ntatable_detach(), dns_rbtdb_create(), dns_resolver_create(), dns_tsigkeyring_create(), dns_zonemgr_create(), free_rbtdb(), isc_stats_detach(), zonemgr_free(), and zt_destroy().