Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
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
}
Exemplo n.º 3
0
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
}
Exemplo n.º 4
0
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;
}
Exemplo n.º 5
0
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
}