summaryrefslogtreecommitdiff
path: root/lib/libc_r/arch/sparc/_atomic_lock.c
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1998-12-18 05:59:19 +0000
committerDavid Leonard <d@cvs.openbsd.org>1998-12-18 05:59:19 +0000
commit771cd4d45afd115c066de4b2682205453eac6929 (patch)
treee2ae5cb642c37fae767bd3a272e68c5a19df7cfa /lib/libc_r/arch/sparc/_atomic_lock.c
parente5f6128f61a9a572c57cf04778f5616489f2e752 (diff)
add md _atomic_is_locked; clean
Diffstat (limited to 'lib/libc_r/arch/sparc/_atomic_lock.c')
-rw-r--r--lib/libc_r/arch/sparc/_atomic_lock.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/libc_r/arch/sparc/_atomic_lock.c b/lib/libc_r/arch/sparc/_atomic_lock.c
index 35b50e3ada5..530c86b4805 100644
--- a/lib/libc_r/arch/sparc/_atomic_lock.c
+++ b/lib/libc_r/arch/sparc/_atomic_lock.c
@@ -1,5 +1,7 @@
-/* $OpenBSD */
-/* atomic lock for sparc */
+/* $OpenBSD: _atomic_lock.c,v 1.2 1998/12/18 05:59:18 d Exp $ */
+/*
+ * Atomic lock for sparc
+ */
#include "spinlock.h"
@@ -8,3 +10,10 @@ _atomic_lock(volatile register_t * lock)
{
return _thread_slow_atomic_lock(lock);
}
+
+int
+_atomic_is_locked(volatile register_t * lock)
+{
+
+ return *lock;
+}