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

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

116nxt_port_reset_next_id()
117{
118 nxt_port_last_id = 1;
119}
120
121
122void
123nxt_port_enable(nxt_task_t *task, nxt_port_t *port,
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_runtime.h>

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

116nxt_port_reset_next_id()
117{
118 nxt_port_last_id = 1;
119}
120
121
122void
123nxt_port_enable(nxt_task_t *task, nxt_port_t *port,
124 nxt_port_handler_t *handlers)
124 nxt_port_handlers_t *handlers)
125{
126 port->pid = nxt_pid;
127 port->handler = nxt_port_handler;
125{
126 port->pid = nxt_pid;
127 port->handler = nxt_port_handler;
128 port->data = handlers;
128 port->data = (nxt_port_handler_t *) (handlers);
129
130 nxt_port_read_enable(task, port);
131}
132
133
134static void
135nxt_port_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
136{

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

266
267 nxt_port_write_enable(task, port);
268
269 msg->new_port = port;
270}
271
272
273void
129
130 nxt_port_read_enable(task, port);
131}
132
133
134static void
135nxt_port_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
136{

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

266
267 nxt_port_write_enable(task, port);
268
269 msg->new_port = port;
270}
271
272
273void
274nxt_port_ready_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
274nxt_port_process_ready_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
275{
276 nxt_port_t *port;
277 nxt_process_t *process;
278 nxt_runtime_t *rt;
279
280 rt = task->thread->runtime;
281
282 nxt_assert(nxt_runtime_is_main(rt));

--- 162 unchanged lines hidden ---
275{
276 nxt_port_t *port;
277 nxt_process_t *process;
278 nxt_runtime_t *rt;
279
280 rt = task->thread->runtime;
281
282 nxt_assert(nxt_runtime_is_main(rt));

--- 162 unchanged lines hidden ---