Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/rangelock.h
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | void *rangelock_rlock(struct rangelock *lock, off_t start, off_t end, | ||||
struct mtx *ilk); | struct mtx *ilk); | ||||
void *rangelock_tryrlock(struct rangelock *lock, off_t start, off_t end, | void *rangelock_tryrlock(struct rangelock *lock, off_t start, off_t end, | ||||
struct mtx *ilk); | struct mtx *ilk); | ||||
void *rangelock_wlock(struct rangelock *lock, off_t start, off_t end, | void *rangelock_wlock(struct rangelock *lock, off_t start, off_t end, | ||||
struct mtx *ilk); | struct mtx *ilk); | ||||
void *rangelock_trywlock(struct rangelock *lock, off_t start, off_t end, | void *rangelock_trywlock(struct rangelock *lock, off_t start, off_t end, | ||||
struct mtx *ilk); | struct mtx *ilk); | ||||
void rlqentry_free(struct rl_q_entry *rlqe); | void rlqentry_free(struct rl_q_entry *rlqe); | ||||
#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) | |||||
void _rangelock_cookie_assert(void *cookie, int what, const char *file, | |||||
int line); | |||||
#endif | |||||
#ifdef INVARIANTS | |||||
#define rangelock_cookie_assert_(cookie, what, file, line) \ | |||||
_rangelock_cookie_assert((cookie), (what), (file), (line)) | |||||
#else | |||||
#define rangelock_cookie_assert_(cookie, what, file, line) (void)0 | |||||
#endif | |||||
#define rangelock_cookie_assert(cookie, what) \ | |||||
rangelock_cookie_assert_((cookie), (what), __FILE__, __LINE__) | |||||
/* | |||||
* Assertion flags. | |||||
*/ | |||||
#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) | |||||
#define RCA_LOCKED 0x0001 | |||||
#define RCA_RLOCKED 0x0002 | |||||
#define RCA_WLOCKED 0x0004 | |||||
#endif | |||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* _SYS_RANGELOCK_H */ | #endif /* _SYS_RANGELOCK_H */ |