FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/rangelock.h>
#include <sys/systm.h>
#include <vm/uma.h>
Go to the source code of this file.
Data Structures | |
struct | rl_q_entry |
Functions | |
__FBSDID ("$BSDSUniX$") | |
static void | rangelock_sys_init (void) |
SYSINIT (vfs, SI_SUB_LOCK, SI_ORDER_ANY, rangelock_sys_init, NULL) | |
static struct rl_q_entry * | rlqentry_alloc (void) |
void | rlqentry_free (struct rl_q_entry *rleq) |
void | rangelock_init (struct rangelock *lock) |
void | rangelock_destroy (struct rangelock *lock) |
static int | rangelock_incompatible (const struct rl_q_entry *e1, const struct rl_q_entry *e2) |
static void | rangelock_calc_block (struct rangelock *lock) |
static void | rangelock_unlock_locked (struct rangelock *lock, struct rl_q_entry *entry, struct mtx *ilk) |
void | rangelock_unlock (struct rangelock *lock, void *cookie, struct mtx *ilk) |
void * | rangelock_unlock_range (struct rangelock *lock, void *cookie, off_t start, off_t end, struct mtx *ilk) |
static void * | rangelock_enqueue (struct rangelock *lock, off_t start, off_t end, int mode, struct mtx *ilk) |
void * | rangelock_rlock (struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) |
void * | rangelock_wlock (struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) |
Variables | |
static uma_zone_t | rl_entry_zone |
__FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 110 of file kern_rangelock.c.
References rangelock_incompatible(), and wakeup().
Referenced by rangelock_enqueue(), rangelock_unlock_locked(), and rangelock_unlock_range().
void rangelock_destroy | ( | struct rangelock * | lock | ) |
Definition at line 80 of file kern_rangelock.c.
Referenced by vdropl().
|
static |
Definition at line 198 of file kern_rangelock.c.
References mode, rangelock_calc_block(), rlqentry_alloc(), and start.
Referenced by rangelock_rlock(), and rangelock_wlock().
|
static |
Definition at line 94 of file kern_rangelock.c.
Referenced by rangelock_calc_block().
void rangelock_init | ( | struct rangelock * | lock | ) |
Definition at line 72 of file kern_rangelock.c.
Referenced by getnewvnode().
void* rangelock_rlock | ( | struct rangelock * | lock, |
off_t | start, | ||
off_t | end, | ||
struct mtx * | ilk | ||
) |
Definition at line 235 of file kern_rangelock.c.
References rangelock_enqueue().
|
static |
Definition at line 49 of file kern_rangelock.c.
References rl_entry_zone.
void rangelock_unlock | ( | struct rangelock * | lock, |
void * | cookie, | ||
struct mtx * | ilk | ||
) |
Definition at line 157 of file kern_rangelock.c.
References rangelock_unlock_locked().
|
static |
Definition at line 139 of file kern_rangelock.c.
References rangelock_calc_block(), and rlqentry_free().
Referenced by rangelock_unlock(), and rangelock_unlock_range().
void* rangelock_unlock_range | ( | struct rangelock * | lock, |
void * | cookie, | ||
off_t | start, | ||
off_t | end, | ||
struct mtx * | ilk | ||
) |
Definition at line 170 of file kern_rangelock.c.
References rangelock_calc_block(), and rangelock_unlock_locked().
void* rangelock_wlock | ( | struct rangelock * | lock, |
off_t | start, | ||
off_t | end, | ||
struct mtx * | ilk | ||
) |
Definition at line 242 of file kern_rangelock.c.
References rangelock_enqueue().
|
static |
Definition at line 58 of file kern_rangelock.c.
References rl_entry_zone.
Referenced by rangelock_enqueue().
void rlqentry_free | ( | struct rl_q_entry * | rleq | ) |
Definition at line 65 of file kern_rangelock.c.
References rl_entry_zone.
Referenced by rangelock_unlock_locked(), and thread_fini().
SYSINIT | ( | vfs | , |
SI_SUB_LOCK | , | ||
SI_ORDER_ANY | , | ||
rangelock_sys_init | , | ||
NULL | |||
) |
|
static |
Definition at line 46 of file kern_rangelock.c.
Referenced by rangelock_sys_init(), rlqentry_alloc(), and rlqentry_free().