diff options
author | David Leonard <d@cvs.openbsd.org> | 1998-12-21 07:37:02 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 1998-12-21 07:37:02 +0000 |
commit | b3d4268288925fddfedfa142adcf20c98fb7fc48 (patch) | |
tree | de1ca6f15aebff9abb87d6a5edb96455807a752e /lib/libpthread/arch/sparc | |
parent | 66bdaa1f5ea7558365a91a75db751c76275ebce2 (diff) |
md spinlock
Diffstat (limited to 'lib/libpthread/arch/sparc')
-rw-r--r-- | lib/libpthread/arch/sparc/_atomic_lock.c | 4 | ||||
-rw-r--r-- | lib/libpthread/arch/sparc/_spinlock.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/libpthread/arch/sparc/_atomic_lock.c b/lib/libpthread/arch/sparc/_atomic_lock.c index 530c86b4805..31636328f93 100644 --- a/lib/libpthread/arch/sparc/_atomic_lock.c +++ b/lib/libpthread/arch/sparc/_atomic_lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: _atomic_lock.c,v 1.2 1998/12/18 05:59:18 d Exp $ */ +/* $OpenBSD: _atomic_lock.c,v 1.3 1998/12/21 07:37:01 d Exp $ */ /* * Atomic lock for sparc */ @@ -15,5 +15,5 @@ int _atomic_is_locked(volatile register_t * lock) { - return *lock; + return _thread_slow_atomic_is_locked(lock); } diff --git a/lib/libpthread/arch/sparc/_spinlock.h b/lib/libpthread/arch/sparc/_spinlock.h new file mode 100644 index 00000000000..87b8e5485e3 --- /dev/null +++ b/lib/libpthread/arch/sparc/_spinlock.h @@ -0,0 +1,6 @@ +/* $OpenBSD: _spinlock.h,v 1.1 1998/12/21 07:37:01 d Exp $ */ + +#define _SPINLOCK_UNLOCKED (0) +#define _SPINLOCK_LOCKED (1) +typedef int _spinlock_lock_t; + |