diff options
Diffstat (limited to 'accel-pptpd/triton/spinlock.h')
-rw-r--r-- | accel-pptpd/triton/spinlock.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/accel-pptpd/triton/spinlock.h b/accel-pptpd/triton/spinlock.h index 7da93f8c..b6d1656a 100644 --- a/accel-pptpd/triton/spinlock.h +++ b/accel-pptpd/triton/spinlock.h @@ -3,9 +3,10 @@ #ifdef USE_SPINLOCK typedef unsigned char spinlock_t; -#define spin_lock(l) {while(__sync_lock_test_and_set(l,1);} +#define spin_lock(l) {while(__sync_lock_test_and_set(l,1));} #define spin_unlock(l) __sync_lock_release(l) #define SPINLOCK_INITIALIZER 0 +#define spinlock_init(l) {*(l)=0;} #else #include <pthread.h> typedef pthread_mutex_t spinlock_t; |