diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2013-11-07 23:14:05 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-11-07 23:14:53 +0400 |
commit | e6fa57219f8fe21c164a3e851d71d696e3e1386c (patch) | |
tree | be9ce0f511a1ba4248d12da3a9c5b159a0441c75 /accel-pppd/triton | |
parent | c6ed5dd9cda38f493224d73bc5af415d7fac7773 (diff) | |
download | accel-ppp-e6fa57219f8fe21c164a3e851d71d696e3e1386c.tar.gz accel-ppp-e6fa57219f8fe21c164a3e851d71d696e3e1386c.zip |
triton: use pthread_spinlock as spinlock
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
Diffstat (limited to 'accel-pppd/triton')
-rw-r--r-- | accel-pppd/triton/spinlock.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/accel-pppd/triton/spinlock.h b/accel-pppd/triton/spinlock.h index bb8dcf44..b09d8276 100644 --- a/accel-pppd/triton/spinlock.h +++ b/accel-pppd/triton/spinlock.h @@ -31,11 +31,11 @@ typedef volatile int __attribute__((aligned)) spinlock_t; #else #include <pthread.h> -typedef pthread_mutex_t spinlock_t; -#define spin_lock(l) pthread_mutex_lock(l) -#define spin_unlock(l) pthread_mutex_unlock(l) -#define SPINLOCK_INITIALIZER PTHREAD_MUTEX_INITIALIZER -#define spinlock_init(l) pthread_mutex_init(l,NULL) +typedef pthread_spinlock_t spinlock_t; +#define spin_lock(l) pthread_spin_lock(l) +#define spin_unlock(l) pthread_spin_unlock(l) +#define SPINLOCK_INITIALIZER 1 +#define spinlock_init(l) pthread_spin_init(l, 0) #endif #endif |