From 81515c09f55f152e8330c3b43ad159be64f494e8 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Thu, 2 Sep 2010 00:22:28 +0400 Subject: rewriting triton library ... --- accel-pptpd/triton/spinlock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'accel-pptpd/triton/spinlock.h') diff --git a/accel-pptpd/triton/spinlock.h b/accel-pptpd/triton/spinlock.h index 7da93f8..b6d1656 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 typedef pthread_mutex_t spinlock_t; -- cgit v1.2.3