diff options
Diffstat (limited to 'accel-pptpd/triton/triton.c')
-rw-r--r-- | accel-pptpd/triton/triton.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/accel-pptpd/triton/triton.c b/accel-pptpd/triton/triton.c index 15e3888..01c6128 100644 --- a/accel-pptpd/triton/triton.c +++ b/accel-pptpd/triton/triton.c @@ -8,6 +8,8 @@ #include "triton_p.h" #include "memdebug.h" +#include <valgrind/drd.h> + int thread_count = 2; int max_events = 64; @@ -77,8 +79,12 @@ static void* triton_thread(struct _triton_thread_t *thread) //printf("thread %p: exit sigwait\n", thread); __sync_add_and_fetch(&triton_stat.thread_active, 1); - if (!thread->ctx) + spin_lock(&threads_lock); + if (!thread->ctx) { + spin_unlock(&threads_lock); continue; + } + spin_unlock(&threads_lock); } cont: |