diff options
Diffstat (limited to 'src/nxt_fiber.h')
-rw-r--r-- | src/nxt_fiber.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nxt_fiber.h b/src/nxt_fiber.h index 7d66612f..8e043b78 100644 --- a/src/nxt_fiber.h +++ b/src/nxt_fiber.h @@ -27,6 +27,8 @@ struct nxt_fiber_s { size_t stack_size; nxt_err_t err; + nxt_task_t task; + nxt_fiber_main_t *main; nxt_fiber_t *next; @@ -37,6 +39,7 @@ struct nxt_fiber_s { struct nxt_fiber_main_s { nxt_fiber_t fiber; nxt_fiber_t *idle; + nxt_event_engine_t *engine; size_t stack_size; nxt_fid_t fid; }; @@ -44,10 +47,10 @@ struct nxt_fiber_main_s { nxt_fiber_main_t *nxt_fiber_main_create(nxt_event_engine_t *engine); nxt_int_t nxt_fiber_create(nxt_fiber_start_t start, void *data, size_t stack); -void nxt_fiber_yield(void); -void nxt_fiber_sleep(nxt_msec_t timeout); -void nxt_fiber_wait(void); -void nxt_fiber_exit(nxt_fiber_t *next, void *data); +void nxt_fiber_yield(nxt_task_t *task); +void nxt_fiber_sleep(nxt_task_t *task, nxt_msec_t timeout); +void nxt_fiber_wait(nxt_task_t *task); +void nxt_fiber_exit(nxt_task_t *task, nxt_fiber_t *next, void *data); NXT_EXPORT nxt_fiber_t *nxt_fiber_self(nxt_thread_t *thr); |