Home
last modified time | relevance | path

Searched refs:engine (Results 1 – 25 of 66) sorted by relevance

123

/unit/src/
H A Dnxt_event_engine.c67 engine->fibers = nxt_fiber_main_create(engine); in nxt_event_engine_create()
74 engine->current_work_queue = &engine->fast_work_queue; in nxt_event_engine_create()
78 engine->fast_work_queue.cache = &engine->work_queue_cache; in nxt_event_engine_create()
80 engine->read_work_queue.cache = &engine->work_queue_cache; in nxt_event_engine_create()
83 engine->write_work_queue.cache = &engine->work_queue_cache; in nxt_event_engine_create()
279 engine->event.signal(engine, signo); in nxt_event_engine_signal()
336 engine = thread->engine; in nxt_event_engine_post_handler()
349 engine = task->thread->engine; in nxt_event_engine_signal_pipe_error()
416 engine->event.free(engine); in nxt_event_engine_change()
457 engine->event.free(engine); in nxt_event_engine_free()
[all …]
H A Dnxt_select_engine.c71 engine->u.select.nfds = -1; in nxt_select_create()
72 engine->u.select.update_nfds = 0; in nxt_select_create()
80 nxt_select_free(engine); in nxt_select_create()
91 nxt_free(engine->u.select.events); in nxt_select_free()
121 nxt_select_disable(engine, ev); in nxt_select_close()
145 engine->u.select.events[fd] = ev; in nxt_select_enable_read()
147 if (engine->u.select.nfds < fd) { in nxt_select_enable_read()
148 engine->u.select.nfds = fd; in nxt_select_enable_read()
175 engine->u.select.nfds = fd; in nxt_select_enable_write()
308 engine->u.select.work_read_fd_set = engine->u.select.main_read_fd_set; in nxt_select_poll()
[all …]
H A Dnxt_pollset_engine.c95 engine->u.pollset.ps = -1; in nxt_pollset_create()
129 nxt_debug(&engine->task, "pollset_create(): %d", engine->u.pollset.ps); in nxt_pollset_create()
135 nxt_pollset_free(engine); in nxt_pollset_create()
146 ps = engine->u.pollset.ps; in nxt_pollset_free()
365 if (engine->u.pollset.nchanges >= engine->u.pollset.mchanges) { in nxt_pollset_change()
371 change = &engine->u.pollset.changes[engine->u.pollset.nchanges++]; in nxt_pollset_change()
389 engine->u.pollset.ps, engine->u.pollset.nchanges); in nxt_pollset_commit_changes()
449 nxt_fd_event_hash_delete(&engine->task, &engine->u.pollset.fd_hash, in nxt_pollset_commit_changes()
474 nxt_fd_event_hash_delete(&engine->task, &engine->u.pollset.fd_hash, in nxt_pollset_change_error()
565 nevents = pollset_poll(engine->u.pollset.ps, engine->u.pollset.events, in nxt_pollset_poll()
[all …]
H A Dnxt_eventport_engine.c94 engine->u.eventport.fd = -1; in nxt_eventport_create()
116 nxt_debug(&engine->task, "port_create(): %d", engine->u.eventport.fd); in nxt_eventport_create()
118 if (engine->signals != NULL) { in nxt_eventport_create()
119 engine->u.eventport.signal_handler = engine->signals->handler; in nxt_eventport_create()
126 nxt_eventport_free(engine); in nxt_eventport_create()
137 port = engine->u.eventport.fd; in nxt_eventport_free()
236 if (engine->u.eventport.nchanges >= engine->u.eventport.mchanges) { in nxt_eventport_enable_event()
242 change = &engine->u.eventport.changes[engine->u.eventport.nchanges++]; in nxt_eventport_enable_event()
284 if (engine->u.eventport.nchanges >= engine->u.eventport.mchanges) { in nxt_eventport_disable_event()
290 change = &engine->u.eventport.changes[engine->u.eventport.nchanges++]; in nxt_eventport_disable_event()
[all …]
H A Dnxt_devpoll_engine.c101 engine->u.devpoll.fd = -1; in nxt_devpoll_create()
130 if (engine->u.devpoll.fd == -1) { in nxt_devpoll_create()
135 nxt_debug(&engine->task, "open(\"/dev/poll\"): %d", engine->u.devpoll.fd); in nxt_devpoll_create()
141 nxt_devpoll_free(engine); in nxt_devpoll_create()
152 fd = engine->u.devpoll.fd; in nxt_devpoll_free()
380 if (engine->u.devpoll.nchanges >= engine->u.devpoll.mchanges) { in nxt_devpoll_change()
386 change = &engine->u.devpoll.changes[engine->u.devpoll.nchanges++]; in nxt_devpoll_change()
403 engine->u.devpoll.fd, engine->u.devpoll.nchanges); in nxt_devpoll_commit_changes()
464 nxt_fd_event_hash_delete(&engine->task, &engine->u.devpoll.fd_hash, in nxt_devpoll_commit_changes()
539 fd = engine->u.devpoll.fd; in nxt_devpoll_write()
[all …]
H A Dnxt_poll_engine.c130 nxt_poll_fd_hash_destroy(engine, &engine->u.poll.fd_hash); in nxt_poll_free()
308 if (engine->u.poll.nchanges >= engine->u.poll.mchanges) { in nxt_poll_change()
314 change = &engine->u.poll.changes[engine->u.poll.nchanges++]; in nxt_poll_change()
328 nxt_debug(&engine->task, "poll changes:%ui", engine->u.poll.nchanges); in nxt_poll_commit_changes()
396 if (engine->u.poll.nfds >= engine->u.poll.max_nfds) { in nxt_poll_set_add()
417 pfd = &engine->u.poll.set[engine->u.poll.nfds++]; in nxt_poll_set_add()
426 lhq.data = engine; in nxt_poll_set_add()
471 lhq.data = engine; in nxt_poll_set_delete()
486 engine->u.poll.set[index] = engine->u.poll.set[nfds]; in nxt_poll_set_delete()
488 phe = nxt_poll_fd_hash_get(engine, engine->u.poll.set[nfds].fd); in nxt_poll_set_delete()
[all …]
H A Dnxt_event_engine.h355 (engine)->event.disable(engine, ev)
359 (engine)->event.delete(engine, ev)
363 (engine)->event.close(engine, ev)
367 (engine)->event.enable_read(engine, ev)
371 (engine)->event.enable_write(engine, ev)
375 (engine)->event.disable_read(engine, ev)
379 (engine)->event.disable_write(engine, ev)
399 (engine)->event.oneshot_read(engine, ev)
403 (engine)->event.oneshot_write(engine, ev)
407 (engine)->event.enable_accept(engine, ev)
[all …]
H A Dnxt_epoll_engine.c319 nxt_debug(&engine->task, "epoll %d free", engine->u.epoll.fd); in nxt_epoll_free()
595 if (engine->u.epoll.nchanges >= engine->u.epoll.mchanges) { in nxt_epoll_change()
601 change = &engine->u.epoll.changes[engine->u.epoll.nchanges++]; in nxt_epoll_change()
616 engine->u.epoll.fd, engine->u.epoll.nchanges); in nxt_epoll_commit_changes()
701 engine->u.epoll.signalfd.data = engine->signals->handler; in nxt_epoll_add_signal()
704 engine->u.epoll.signalfd.log = engine->task.log; in nxt_epoll_add_signal()
705 engine->u.epoll.signalfd.task = &engine->task; in nxt_epoll_add_signal()
786 engine->u.epoll.eventfd.data = engine; in nxt_epoll_enable_post()
787 engine->u.epoll.eventfd.log = engine->task.log; in nxt_epoll_enable_post()
788 engine->u.epoll.eventfd.task = &engine->task; in nxt_epoll_enable_post()
[all …]
H A Dnxt_kqueue_engine.c199 nxt_debug(&engine->task, "kqueue(): %d", engine->u.kqueue.fd); in nxt_kqueue_create()
213 nxt_kqueue_free(engine); in nxt_kqueue_create()
304 end = &engine->u.kqueue.changes[engine->u.kqueue.nchanges]; in nxt_kqueue_close()
475 ret = kevent(engine->u.kqueue.fd, engine->u.kqueue.changes, nchanges, in nxt_kqueue_get_kevent()
488 return &engine->u.kqueue.changes[engine->u.kqueue.nchanges++]; in nxt_kqueue_get_kevent()
501 end = &engine->u.kqueue.changes[engine->u.kqueue.nchanges]; in nxt_kqueue_error()
690 engine->u.kqueue.fd, engine->u.kqueue.nchanges, timeout); in nxt_kqueue_poll()
693 engine->u.kqueue.changes, engine->u.kqueue.nchanges, in nxt_kqueue_poll()
694 engine->u.kqueue.events, engine->u.kqueue.mevents, tp); in nxt_kqueue_poll()
700 nxt_debug(&engine->task, "kevent(%d): %d", engine->u.kqueue.fd, nevents); in nxt_kqueue_poll()
[all …]
H A Dnxt_conn_close.c62 wq = &engine->shutdown_work_queue; in nxt_conn_close()
66 wq = &engine->close_work_queue; in nxt_conn_close()
78 nxt_event_engine_t *engine; in nxt_conn_shutdown_handler() local
81 engine = data; in nxt_conn_shutdown_handler()
90 task, c, engine); in nxt_conn_shutdown_handler()
99 nxt_event_engine_t *engine; in nxt_conn_close_handler() local
102 engine = data; in nxt_conn_close_handler()
123 engine->closed_conns_cnt++; in nxt_conn_close_handler()
146 nxt_event_engine_t *engine; in nxt_conn_close_timer_handler() local
154 engine = task->thread->engine; in nxt_conn_close_timer_handler()
[all …]
H A Dnxt_signal.c104 nxt_event_engine_signal(thr->engine, signo); in nxt_signal_handler()
111 nxt_signal_thread_start(nxt_event_engine_t *engine) in nxt_signal_thread_start() argument
116 if (engine->signals->process == nxt_pid) { in nxt_signal_thread_start()
140 link->work.data = engine; in nxt_signal_thread_start()
143 engine->signals->process = nxt_pid; in nxt_signal_thread_start()
158 nxt_event_engine_t *engine; in nxt_signal_thread() local
160 engine = data; in nxt_signal_thread()
167 err = sigwait(&engine->signals->sigmask, &signo); in nxt_signal_thread()
174 nxt_event_engine_signal(engine, signo); in nxt_signal_thread()
184 nxt_signal_thread_stop(nxt_event_engine_t *engine) in nxt_signal_thread_stop() argument
[all …]
H A Dnxt_conn_accept.c41 nxt_event_engine_t *engine; in nxt_listen_event() local
48 engine = task->thread->engine; in nxt_listen_event()
49 lev->batch = engine->batch; in nxt_listen_event()
90 nxt_event_engine_t *engine; in nxt_conn_accept_alloc() local
92 engine = task->thread->engine; in nxt_conn_accept_alloc()
94 if (engine->connections < engine->max_connections) { in nxt_conn_accept_alloc()
191 nxt_event_engine_t *engine; in nxt_conn_accept() local
199 engine = task->thread->engine; in nxt_conn_accept()
203 nxt_conn_idle(engine, c); in nxt_conn_accept()
258 engine = task->thread->engine; in nxt_conn_accept_close_idle()
[all …]
H A Dnxt_signal.h39 #define nxt_event_engine_signals_start(engine) \ argument
40 nxt_signal_thread_start(engine)
42 #define nxt_event_engine_signals_stop(engine) \ argument
43 nxt_signal_thread_stop(engine)
46 NXT_EXPORT nxt_int_t nxt_signal_thread_start(nxt_event_engine_t *engine);
47 NXT_EXPORT void nxt_signal_thread_stop(nxt_event_engine_t *engine);
H A Dnxt_timer.c76 time = engine->timers.now + timeout; in nxt_timer_add()
100 nxt_timer_change(engine, timer, NXT_TIMER_ADD, time); in nxt_timer_add()
119 nxt_timer_change(engine, timer, NXT_TIMER_NOPE, 0); in nxt_timer_delete()
132 timers = &engine->timers; in nxt_timer_change()
141 nxt_timer_changes_commit(engine); in nxt_timer_change()
160 nxt_timer_changes_commit(nxt_event_engine_t *engine) in nxt_timer_changes_commit() argument
166 timers = &engine->timers; in nxt_timer_changes_commit()
229 nxt_timer_find(nxt_event_engine_t *engine) in nxt_timer_find() argument
238 timers = &engine->timers; in nxt_timer_find()
241 nxt_timer_changes_commit(engine); in nxt_timer_find()
[all …]
H A Dnxt_conn_read.c13 nxt_event_engine_t *engine; in nxt_conn_wait() local
19 engine = c->socket.task->thread->engine; in nxt_conn_wait()
31 nxt_conn_timer(engine, c, state, &c->read_timer); in nxt_conn_wait()
33 nxt_fd_event_enable_read(engine, &c->socket); in nxt_conn_wait()
42 nxt_event_engine_t *engine; in nxt_conn_io_read() local
56 engine = task->thread->engine; in nxt_conn_io_read()
82 nxt_fd_event_block_read(engine, &c->socket); in nxt_conn_io_read()
97 nxt_fd_event_block_read(engine, &c->socket); in nxt_conn_io_read()
98 nxt_timer_disable(engine, &c->read_timer); in nxt_conn_io_read()
100 nxt_work_queue_add(&engine->fast_work_queue, in nxt_conn_io_read()
[all …]
H A Dnxt_timer.h96 nxt_msec_t nxt_timer_find(nxt_event_engine_t *engine);
97 void nxt_timer_expire(nxt_event_engine_t *engine, nxt_msec_t now);
99 NXT_EXPORT void nxt_timer_add(nxt_event_engine_t *engine, nxt_timer_t *timer,
101 NXT_EXPORT nxt_bool_t nxt_timer_delete(nxt_event_engine_t *engine,
105 nxt_timer_disable(nxt_event_engine_t *engine, nxt_timer_t *timer) in nxt_timer_disable() argument
H A Dnxt_conn.c67 thr->engine->connections++; in nxt_conn_create()
76 c->io = thr->engine->event.io; in nxt_conn_create()
80 c->socket.read_work_queue = &thr->engine->fast_work_queue; in nxt_conn_create()
81 c->socket.write_work_queue = &thr->engine->fast_work_queue; in nxt_conn_create()
86 nxt_log_debug(&c->log, "connections: %uD", thr->engine->connections); in nxt_conn_create()
97 task->thread->engine->connections--; in nxt_conn_free()
105 nxt_conn_timer(nxt_event_engine_t *engine, nxt_conn_t *c, in nxt_conn_timer() argument
115 nxt_timer_add(engine, timer, value); in nxt_conn_timer()
H A Dnxt_conn_connect.c29 nxt_work_queue_add(&task->thread->engine->connect_work_queue, in nxt_conn_sys_socket()
39 nxt_event_engine_t *engine; in nxt_conn_io_connect() local
57 engine = task->thread->engine; in nxt_conn_io_connect()
59 nxt_conn_timer(engine, c, state, &c->write_timer); in nxt_conn_io_connect()
61 nxt_fd_event_enable_write(engine, &c->socket); in nxt_conn_io_connect()
131 nxt_fd_event_block_write(task->thread->engine, &c->socket); in nxt_conn_connect_test()
134 nxt_timer_disable(task->thread->engine, &c->write_timer); in nxt_conn_connect_test()
H A Dnxt_conn.h224 NXT_EXPORT void nxt_conn_close(nxt_event_engine_t *engine, nxt_conn_t *c);
226 NXT_EXPORT void nxt_conn_timer(nxt_event_engine_t *engine, nxt_conn_t *c,
261 nxt_bool_t nxt_event_conn_write_delayed(nxt_event_engine_t *engine,
271 #define nxt_conn_connect(engine, c) \ argument
272 nxt_work_queue_add(&engine->socket_work_queue, nxt_conn_sys_socket, \
276 #define nxt_conn_read(engine, c) \ argument
278 nxt_event_engine_t *e = engine; \
287 #define nxt_conn_write(engine, c) \ argument
289 nxt_event_engine_t *e = engine; \
298 #define nxt_conn_idle(engine, c) \ argument
[all …]
H A Dnxt_runtime.c300 thread->engine = engine; in nxt_runtime_event_engines()
435 nxt_event_engine_t *engine; in nxt_runtime_quit() local
439 engine = task->thread->engine; in nxt_runtime_quit()
445 if (!engine->shutdown) { in nxt_runtime_quit()
446 engine->shutdown = 1; in nxt_runtime_quit()
548 nxt_event_engine_t *engine; in nxt_runtime_exit() local
551 engine = data; in nxt_runtime_exit()
623 engine = task->thread->engine; in nxt_runtime_event_engine_change()
626 && nxt_strcmp(engine->event.name, rt->engine) == 0) in nxt_runtime_event_engine_change()
645 nxt_event_engine_t *engine; in nxt_runtime_event_engine_free() local
[all …]
H A Dnxt_thread_pool.c19 nxt_thread_pool_init_t init, nxt_event_engine_t *engine, in nxt_thread_pool_create() argument
31 tp->engine = engine; in nxt_thread_pool_create()
32 tp->task.thread = engine->task.thread; in nxt_thread_pool_create()
33 tp->task.log = engine->task.log; in nxt_thread_pool_create()
239 nxt_work_queue_add(&thr->engine->fast_work_queue, tp->exit, in nxt_thread_pool_destroy()
240 &tp->engine->task, tp, NULL); in nxt_thread_pool_destroy()
299 nxt_work_set(&tp->work, tp->exit, &tp->engine->task, tp, in nxt_thread_pool_exit()
302 nxt_event_engine_post(tp->engine, &tp->work); in nxt_thread_pool_exit()
H A Dnxt_router.c1786 app->engine = engine; in nxt_router_conf_create()
2967 engine = task->thread->engine; in nxt_router_app_prefork_ready()
3310 link->engine = engine; in nxt_router_thread_create()
3354 engine = recf->engine; in nxt_router_engines_post()
3412 engine = link->engine; in nxt_router_thread_start()
3424 thread->engine = engine; in nxt_router_thread_start()
3568 engine = task->thread->engine; in nxt_router_listen_socket_update()
3603 engine = task->thread->engine; in nxt_router_listen_socket_delete()
3629 engine = task->thread->engine; in nxt_router_worker_thread_quit()
3808 engine = link->engine; in nxt_router_thread_exit_handler()
[all …]
H A Dnxt_h1proto.c229 engine = task->thread->engine; in nxt_http_conn_init()
241 nxt_conn_read(engine, c); in nxt_http_conn_init()
322 engine = task->thread->engine; in nxt_http_conn_test()
331 nxt_conn_read(engine, c); in nxt_http_conn_test()
1032 engine = task->thread->engine; in nxt_h1p_conn_request_body_read()
1723 engine = task->thread->engine; in nxt_h1p_conn_sent()
1803 engine = task->thread->engine; in nxt_h1p_keepalive()
1805 nxt_conn_idle(engine, c); in nxt_h1p_keepalive()
2115 engine = task->thread->engine; in nxt_h1p_conn_free()
2387 engine = task->thread->engine; in nxt_h1p_peer_header_sent()
[all …]
H A Dnxt_job.c114 job->engine = task->thread->engine; in nxt_job_start()
159 if (job->engine != NULL) { in nxt_job_return()
165 nxt_event_engine_post(job->engine, &job->work); in nxt_job_return()
175 nxt_work_queue_add(&task->thread->engine->fast_work_queue, in nxt_job_return()
H A Dnxt_thread_pool.h30 nxt_event_engine_t *engine; member
38 nxt_event_engine_t *engine, nxt_work_handler_t exit);

123