Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpt/mpt.h
Show First 20 Lines • Show All 765 Lines • ▼ Show 20 Lines | if (mpt->mpt_locksetup) { \ | ||||
mtx_destroy(&mpt->mpt_lock); \ | mtx_destroy(&mpt->mpt_lock); \ | ||||
mpt->mpt_locksetup = 0; \ | mpt->mpt_locksetup = 0; \ | ||||
} | } | ||||
#define MPT_LOCK(mpt) mtx_lock(&(mpt)->mpt_lock) | #define MPT_LOCK(mpt) mtx_lock(&(mpt)->mpt_lock) | ||||
#define MPT_UNLOCK(mpt) mtx_unlock(&(mpt)->mpt_lock) | #define MPT_UNLOCK(mpt) mtx_unlock(&(mpt)->mpt_lock) | ||||
#define MPT_OWNED(mpt) mtx_owned(&(mpt)->mpt_lock) | #define MPT_OWNED(mpt) mtx_owned(&(mpt)->mpt_lock) | ||||
#define MPT_LOCK_ASSERT(mpt) mtx_assert(&(mpt)->mpt_lock, MA_OWNED) | #define MPT_LOCK_ASSERT(mpt) mtx_assert(&(mpt)->mpt_lock, MA_OWNED) | ||||
#define mpt_sleep(mpt, ident, priority, wmesg, timo) \ | #define mpt_sleep(mpt, ident, priority, wmesg, sbt) \ | ||||
msleep(ident, &(mpt)->mpt_lock, priority, wmesg, timo) | msleep_sbt(ident, &(mpt)->mpt_lock, priority, wmesg, sbt, 0, 0) | ||||
#define mpt_req_timeout(req, ticks, func, arg) \ | #define mpt_req_timeout(req, sbt, func, arg) \ | ||||
callout_reset(&(req)->callout, (ticks), (func), (arg)) | callout_reset_sbt(&(req)->callout, (sbt), 0, (func), (arg), 0) | ||||
#define mpt_req_untimeout(req, func, arg) \ | #define mpt_req_untimeout(req, func, arg) \ | ||||
callout_stop(&(req)->callout) | callout_stop(&(req)->callout) | ||||
#define mpt_callout_init(mpt, c) \ | #define mpt_callout_init(mpt, c) \ | ||||
callout_init_mtx(c, &(mpt)->mpt_lock, 0) | callout_init_mtx(c, &(mpt)->mpt_lock, 0) | ||||
#define mpt_callout_drain(mpt, c) \ | #define mpt_callout_drain(mpt, c) \ | ||||
callout_drain(c) | callout_drain(c) | ||||
/******************************* Register Access ******************************/ | /******************************* Register Access ******************************/ | ||||
▲ Show 20 Lines • Show All 363 Lines • Show Last 20 Lines |