diff options
author | Kozlov Dmitry <dima@server> | 2010-09-01 19:29:43 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-09-01 19:29:43 +0400 |
commit | 2b63c6e6e368d6ea39584a70ddb81a88e0924c47 (patch) | |
tree | 790cc5d46e691b4b920170b7dfde40d3c6ec4be6 /accel-pptpd/triton/loader.c | |
parent | 5bac5a2edb7bc7639c853fd0f7109dcddb7c4cee (diff) | |
download | accel-ppp-2b63c6e6e368d6ea39584a70ddb81a88e0924c47.tar.gz accel-ppp-2b63c6e6e368d6ea39584a70ddb81a88e0924c47.zip |
rewriting triton library ...
Diffstat (limited to 'accel-pptpd/triton/loader.c')
-rw-r--r-- | accel-pptpd/triton/loader.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/accel-pptpd/triton/loader.c b/accel-pptpd/triton/loader.c index 33d48315..a390f0a9 100644 --- a/accel-pptpd/triton/loader.c +++ b/accel-pptpd/triton/loader.c @@ -4,52 +4,5 @@ #include <stdio.h> #include <pthread.h> -#include "conf_file.h" #include "triton_p.h" -void md_init(void); -void event_init(void); -void timer_init(void); - -struct thread_arg_t -{ - int (*post_init)(void*); - void *arg; -}; - -void *thread(struct thread_arg_t *arg) -{ - printf("triton: starting new thread\n"); - #ifdef USE_CORO - coroutine_init(); - #endif - md_init(); - event_init(); - timer_init(); - - arg->post_init(arg->arg); - - free(arg); - - //conf_file_load(cf_name); - #ifdef USE_CORO - schedule(); - #else - md_run(); - #endif - - return NULL; -} - -int triton_init(const char *conf_file) -{ - return 0; -} -int triton_run(int (*post_init)(void*),void *arg) -{ - pthread_t thr; - struct thread_arg_t *thr_arg=malloc(sizeof(*thr_arg)); - thr_arg->post_init=post_init; - thr_arg->arg=arg; - return pthread_create(&thr,NULL,(void*(*)(void*))thread,thr_arg); -} |