diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2010-12-22 23:06:17 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2010-12-22 23:06:17 +0300 |
commit | b2852c06894002890aa49322ded6c99022cc6d17 (patch) | |
tree | 9613bb0feb219185deca65a85c090fe21cd8941e /accel-pptpd/triton/triton.c | |
parent | 0489841b673164b666a800255d86ab94d25cd45b (diff) | |
download | accel-ppp-xebd-b2852c06894002890aa49322ded6c99022cc6d17.tar.gz accel-ppp-xebd-b2852c06894002890aa49322ded6c99022cc6d17.zip |
minor changes
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: |