void mtx_enter(struct mutex *mtx) { if (mtx->mtx_wantipl != IPL_NONE) mtx->mtx_oldipl = _splraise(mtx->mtx_wantipl); MUTEX_ASSERT_UNLOCKED(mtx); mtx->mtx_lock = 1; }
void mtx_enter(struct mutex *mtx) { mtx->mtx_oldipl = splraise(mtx->mtx_wantipl); MUTEX_ASSERT_UNLOCKED(mtx); mtx->mtx_lock = 1; #ifdef DIAGNOSTIC curcpu()->ci_mutex_level++; #endif }
void mtx_enter(struct mutex *mtx) { if (mtx->mtx_wantipl != IPL_NONE) mtx->mtx_oldipl = _splraise(MD_IPLTOPSL(mtx->mtx_wantipl)); MUTEX_ASSERT_UNLOCKED(mtx); mtx->mtx_lock = 1; #ifdef DIAGNOSTIC curcpu()->ci_mutex_level++; #endif }
void mtx_enter(struct mutex *mtx) { int psr; if (mtx->mtx_wantipl != IPL_NONE << 8) { psr = getpsr(); mtx->mtx_oldipl = psr & PSR_PIL; if (mtx->mtx_oldipl < mtx->mtx_wantipl) setpsr((psr & ~PSR_PIL) | mtx->mtx_wantipl); } MUTEX_ASSERT_UNLOCKED(mtx); mtx->mtx_lock = 1; }
void mtx_enter(struct mutex *mtx) { int psr; if (mtx->mtx_wantipl != IPL_NONE << 8) { psr = getpsr(); mtx->mtx_oldipl = psr & PSR_PIL; if (mtx->mtx_oldipl < mtx->mtx_wantipl) setpsr((psr & ~PSR_PIL) | mtx->mtx_wantipl); } MUTEX_ASSERT_UNLOCKED(mtx); mtx->mtx_lock = 1; #ifdef DIAGNOSTIC curcpu()->ci_mutex_level++; #endif }