nxt_event_engine.c (318:c2442f5e054d) nxt_event_engine.c (326:2aad6a5fac13)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 34 unchanged lines hidden (view full) ---

43 thread = task->thread;
44
45 engine->task.thread = thread;
46 engine->task.log = thread->log;
47 engine->task.ident = nxt_task_next_ident();
48
49 engine->batch = batch;
50
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 34 unchanged lines hidden (view full) ---

43 thread = task->thread;
44
45 engine->task.thread = thread;
46 engine->task.log = thread->log;
47 engine->task.ident = nxt_task_next_ident();
48
49 engine->batch = batch;
50
51#if 0
51 if (flags & NXT_ENGINE_FIBERS) {
52 engine->fibers = nxt_fiber_main_create(engine);
53 if (engine->fibers == NULL) {
54 goto fibers_fail;
55 }
56 }
52 if (flags & NXT_ENGINE_FIBERS) {
53 engine->fibers = nxt_fiber_main_create(engine);
54 if (engine->fibers == NULL) {
55 goto fibers_fail;
56 }
57 }
58#endif
57
58 engine->current_work_queue = &engine->fast_work_queue;
59
60 nxt_work_queue_cache_create(&engine->work_queue_cache, 0);
61
62 engine->fast_work_queue.cache = &engine->work_queue_cache;
63 engine->accept_work_queue.cache = &engine->work_queue_cache;
64 engine->read_work_queue.cache = &engine->work_queue_cache;

--- 68 unchanged lines hidden (view full) ---

133
134event_set_fail:
135signals_fail:
136
137 nxt_free(engine->signals);
138 nxt_work_queue_cache_destroy(&engine->work_queue_cache);
139 nxt_free(engine->fibers);
140
59
60 engine->current_work_queue = &engine->fast_work_queue;
61
62 nxt_work_queue_cache_create(&engine->work_queue_cache, 0);
63
64 engine->fast_work_queue.cache = &engine->work_queue_cache;
65 engine->accept_work_queue.cache = &engine->work_queue_cache;
66 engine->read_work_queue.cache = &engine->work_queue_cache;

--- 68 unchanged lines hidden (view full) ---

135
136event_set_fail:
137signals_fail:
138
139 nxt_free(engine->signals);
140 nxt_work_queue_cache_destroy(&engine->work_queue_cache);
141 nxt_free(engine->fibers);
142
143#if 0
141fibers_fail:
142
143 nxt_free(engine);
144fibers_fail:
145
146 nxt_free(engine);
147#endif
148
144 return NULL;
145}
146
147
148static nxt_int_t
149nxt_event_engine_post_init(nxt_event_engine_t *engine)
150{
151 if (engine->event.enable_post != NULL) {

--- 402 unchanged lines hidden ---
149 return NULL;
150}
151
152
153static nxt_int_t
154nxt_event_engine_post_init(nxt_event_engine_t *engine)
155{
156 if (engine->event.enable_post != NULL) {

--- 402 unchanged lines hidden ---