summaryrefslogtreecommitdiff
path: root/accel-pptpd/triton
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2010-09-26 20:25:21 +0400
committerDmitry Kozlov <xeb@mail.ru>2010-09-26 20:25:21 +0400
commitf122327288ae4429bb88a0fefdcef0bf80f54023 (patch)
treeed614bad3d0d1e156e39683da1d30871cad54c94 /accel-pptpd/triton
parent863e1de3aa67a03bdf2b9720b32eafe6670b29a3 (diff)
downloadaccel-ppp-f122327288ae4429bb88a0fefdcef0bf80f54023.tar.gz
accel-ppp-f122327288ae4429bb88a0fefdcef0bf80f54023.zip
various bug fixed and improvements
Diffstat (limited to 'accel-pptpd/triton')
-rw-r--r--accel-pptpd/triton/spinlock.h2
-rw-r--r--accel-pptpd/triton/triton.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/accel-pptpd/triton/spinlock.h b/accel-pptpd/triton/spinlock.h
index 5ef9c488..b13cde61 100644
--- a/accel-pptpd/triton/spinlock.h
+++ b/accel-pptpd/triton/spinlock.h
@@ -2,7 +2,7 @@
#define __TRITON_SPINLOCK_H
#ifdef GCC_SPINLOCK
-typedef unsigned char spinlock_t;
+typedef volatile unsigned char spinlock_t;
#define spin_lock(l) {while(__sync_lock_test_and_set(l,1));}
#define spin_unlock(l) __sync_lock_release(l)
#define SPINLOCK_INITIALIZER 0
diff --git a/accel-pptpd/triton/triton.c b/accel-pptpd/triton/triton.c
index ce880e96..d7939041 100644
--- a/accel-pptpd/triton/triton.c
+++ b/accel-pptpd/triton/triton.c
@@ -74,6 +74,9 @@ static void* triton_thread(struct _triton_thread_t *thread)
sigwait(&set, &sig);
//printf("thread %p: exit sigwait\n", thread);
__sync_fetch_and_add(&triton_stat.thread_active, 1);
+
+ if (!thread->ctx)
+ continue;
}
cont: