FreeBSD ZFS
The Zettabyte File System
|
#include <sys/zfs_context.h>
#include <sys/refcount.h>
Go to the source code of this file.
Data Structures | |
struct | rrwlock |
A reader-writer lock implementation that allows re-entrant reads, but still gives writers priority on "new" reads. More... | |
Defines | |
#define | RRW_READ_HELD(x) rrw_held(x, RW_READER) |
#define | RRW_WRITE_HELD(x) rrw_held(x, RW_WRITER) |
Typedefs | |
typedef struct rrwlock | rrwlock_t |
A reader-writer lock implementation that allows re-entrant reads, but still gives writers priority on "new" reads. | |
Functions | |
void | rrw_init (rrwlock_t *rrl) |
void | rrw_destroy (rrwlock_t *rrl) |
void | rrw_enter (rrwlock_t *rrl, krw_t rw, void *tag) |
void | rrw_exit (rrwlock_t *rrl, void *tag) |
boolean_t | rrw_held (rrwlock_t *rrl, krw_t rw) |
A reader-writer lock implementation that allows re-entrant reads, but still gives writers priority on "new" reads.
See rrwlock.c for more details about the implementation.
Fields of the rrwlock_t structure:
void rrw_enter | ( | rrwlock_t * | rrl, |
krw_t | rw, | ||
void * | tag | ||
) |
[in] | tag | Used in reference count tracking. The value used in rrw_enter() must also be used any corresponding rrw_exit()s. |
void rrw_exit | ( | rrwlock_t * | rrl, |
void * | tag | ||
) |
[in] | tag | Used in reference count tracking. The value used in rrw_exit() must match that used by its corresponding rrw_enter(). |