diff options
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r-- | sys/arch/alpha/alpha/mutex.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/arch/alpha/alpha/mutex.c b/sys/arch/alpha/alpha/mutex.c index 6b8f1e66b15..747753b9157 100644 --- a/sys/arch/alpha/alpha/mutex.c +++ b/sys/arch/alpha/alpha/mutex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mutex.c,v 1.5 2010/09/28 20:27:52 miod Exp $ */ +/* $OpenBSD: mutex.c,v 1.6 2011/04/03 18:46:38 miod Exp $ */ /* * Copyright (c) 2004 Artur Grabowski <art@openbsd.org> @@ -50,8 +50,7 @@ mtx_init(struct mutex *mtx, int wantipl) void mtx_enter(struct mutex *mtx) { - if (mtx->mtx_wantipl != IPL_NONE) - mtx->mtx_oldipl = _splraise(mtx->mtx_wantipl); + mtx->mtx_oldipl = _splraise(mtx->mtx_wantipl); MUTEX_ASSERT_UNLOCKED(mtx); mtx->mtx_lock = 1; #ifdef DIAGNOSTIC @@ -62,8 +61,7 @@ mtx_enter(struct mutex *mtx) int mtx_enter_try(struct mutex *mtx) { - if (mtx->mtx_wantipl != IPL_NONE) - mtx->mtx_oldipl = _splraise(mtx->mtx_wantipl); + mtx->mtx_oldipl = _splraise(mtx->mtx_wantipl); MUTEX_ASSERT_UNLOCKED(mtx); mtx->mtx_lock = 1; #ifdef DIAGNOSTIC @@ -81,6 +79,5 @@ mtx_leave(struct mutex *mtx) #ifdef DIAGNOSTIC curcpu()->ci_mutex_level--; #endif - if (mtx->mtx_wantipl != IPL_NONE) - splx(mtx->mtx_oldipl); + splx(mtx->mtx_oldipl); } |