diff options
author | deischen <deischen@FreeBSD.org> | 2007-11-30 17:20:29 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2007-11-30 17:20:29 +0000 |
commit | f1ac56b04d023087e7771958a39880cb905293e9 (patch) | |
tree | d3459c2b707d5533cdf469b26aa07ba25bc884ef /lib/libkse/thread/thr_pspinlock.c | |
parent | 7e7891776f848635b8c67e11ba0e40d815f2a092 (diff) | |
download | FreeBSD-src-f1ac56b04d023087e7771958a39880cb905293e9.zip FreeBSD-src-f1ac56b04d023087e7771958a39880cb905293e9.tar.gz |
WARNS=3'ify.
Diffstat (limited to 'lib/libkse/thread/thr_pspinlock.c')
-rw-r--r-- | lib/libkse/thread/thr_pspinlock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libkse/thread/thr_pspinlock.c b/lib/libkse/thread/thr_pspinlock.c index 5836fde..2d6075a 100644 --- a/lib/libkse/thread/thr_pspinlock.c +++ b/lib/libkse/thread/thr_pspinlock.c @@ -26,11 +26,13 @@ * $FreeBSD$ */ +#include "namespace.h" #include <sys/types.h> #include <errno.h> #include <pthread.h> #include <stdint.h> #include <stdlib.h> +#include "un-namespace.h" #include "atomic_ops.h" #include "thr_private.h" @@ -106,7 +108,7 @@ _pthread_spin_trylock(pthread_spinlock_t *lock) else if (lck->s_lock != 0) ret = EBUSY; else { - atomic_swap_int((int *)&(lck)->s_lock, 1, &oldval); + atomic_swap_int(&(lck)->s_lock, 1, &oldval); if (oldval) ret = EBUSY; else { @@ -141,7 +143,7 @@ _pthread_spin_lock(pthread_spinlock_t *lock) _pthread_yield(); } } - atomic_swap_int((int *)&(lck)->s_lock, 1, &oldval); + atomic_swap_int(&(lck)->s_lock, 1, &oldval); } while (oldval); lck->s_owner = self; @@ -164,7 +166,7 @@ _pthread_spin_unlock(pthread_spinlock_t *lock) ret = EPERM; else { lck->s_owner = NULL; - atomic_swap_int((int *)&lck->s_lock, 0, &ret); + atomic_swap_int(&lck->s_lock, 0, &ret); ret = 0; } } |