summaryrefslogtreecommitdiff
path: root/sys/arch/arm/s3c2xx0/s3c2xx0_mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/arm/s3c2xx0/s3c2xx0_mutex.c')
-rw-r--r--sys/arch/arm/s3c2xx0/s3c2xx0_mutex.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/arch/arm/s3c2xx0/s3c2xx0_mutex.c b/sys/arch/arm/s3c2xx0/s3c2xx0_mutex.c
index 04c3332a1e5..e186a756ca7 100644
--- a/sys/arch/arm/s3c2xx0/s3c2xx0_mutex.c
+++ b/sys/arch/arm/s3c2xx0/s3c2xx0_mutex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3c2xx0_mutex.c,v 1.1 2008/11/26 14:39:14 drahn Exp $ */
+/* $OpenBSD: s3c2xx0_mutex.c,v 1.2 2009/08/13 13:24:55 weingart Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
@@ -58,6 +58,18 @@ mtx_enter(struct mutex *mtx)
}
void
+mtx_enter_try(struct mutex *mtx)
+{
+ if (mtx->mtx_wantipl != IPL_NONE)
+ mtx->mtx_oldipl = _splraise(mtx->mtx_wantipl);
+
+ MUTEX_ASSERT_UNLOCKED(mtx);
+ mtx->mtx_lock = 1;
+
+ return 1;
+}
+
+void
mtx_leave(struct mutex *mtx)
{
MUTEX_ASSERT_LOCKED(mtx);