diff options
-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 |