diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2011-01-03 00:51:11 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2011-01-03 00:51:11 +0300 |
commit | 6409b409508f22ea7dbb3f3fa2cb9de78d5073c5 (patch) | |
tree | 1ebd296d3f459103a9459695524c56c0bcbd2f1d /accel-pptpd/triton/triton_p.h | |
parent | 95a19e0c5c622e8e886ff822ea48d28f7bceced4 (diff) | |
download | accel-ppp-6409b409508f22ea7dbb3f3fa2cb9de78d5073c5.tar.gz accel-ppp-6409b409508f22ea7dbb3f3fa2cb9de78d5073c5.zip |
core: rewrited to don't use getcontext/swapcontext due to *context functions works buggy on some combinations of kernel/gcc/glibc
Diffstat (limited to 'accel-pptpd/triton/triton_p.h')
-rw-r--r-- | accel-pptpd/triton/triton_p.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/accel-pptpd/triton/triton_p.h b/accel-pptpd/triton/triton_p.h index 5804007..03067a1 100644 --- a/accel-pptpd/triton/triton_p.h +++ b/accel-pptpd/triton/triton_p.h @@ -3,23 +3,19 @@ #include <pthread.h> #include <sys/epoll.h> -#include <ucontext.h> #include "triton.h" #include "list.h" #include "spinlock.h" #include "mempool.h" -#define CTX_STACK_SIZE 8196 - struct _triton_thread_t { struct list_head entry; struct list_head entry2; pthread_t thread; - int terminate:1; + int terminate; struct _triton_context_t *ctx; - ucontext_t uctx; }; struct _triton_context_t @@ -36,16 +32,17 @@ struct _triton_context_t struct list_head pending_timers; struct list_head pending_calls; - ucontext_t uctx; - + int init; int queued; - int sleeping; int wakeup; int need_close; int need_free; int pending; int priority; + pthread_mutex_t sleep_lock; + pthread_cond_t sleep_cond; + struct triton_context_t *ud; void *bf_arg; }; |