diff options
author | jeff <jeff@FreeBSD.org> | 2003-03-26 04:02:24 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-03-26 04:02:24 +0000 |
commit | b16324e722e525519c8428c70f46f6d0b18b9bc1 (patch) | |
tree | 23941a59360abf1f23a2109a15011a66807ae876 /lib/libc/include | |
parent | e83d116ac9c75acdc5e784978e799e942dc57d96 (diff) | |
download | FreeBSD-src-b16324e722e525519c8428c70f46f6d0b18b9bc1.zip FreeBSD-src-b16324e722e525519c8428c70f46f6d0b18b9bc1.tar.gz |
- Define a _spinunlock() function so that threading implementations may do
more complicated things than just setting the lock to 0.
- Implement stubs for this function in libc and the two threading libraries
that are currently in the tree.
Diffstat (limited to 'lib/libc/include')
-rw-r--r-- | lib/libc/include/spinlock.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/include/spinlock.h b/lib/libc/include/spinlock.h index d661ecf..6334253 100644 --- a/lib/libc/include/spinlock.h +++ b/lib/libc/include/spinlock.h @@ -52,7 +52,7 @@ typedef struct { #define _SPINLOCK_INITIALIZER { 0, 0, 0, 0 } -#define _SPINUNLOCK(_lck) (_lck)->access_lock = 0 +#define _SPINUNLOCK(_lck) _spinunlock(_lck); #ifdef _LOCK_DEBUG #define _SPINLOCK(_lck) _spinlock_debug(_lck, __FILE__, __LINE__) #else @@ -65,6 +65,7 @@ typedef struct { __BEGIN_DECLS long _atomic_lock(volatile long *); void _spinlock(spinlock_t *); +void _spinunlock(spinlock_t *); void _spinlock_debug(spinlock_t *, char *, int); __END_DECLS |