nxt_port.h (198:6c83f6294893) nxt_port.h (205:cb624bb9ac0c)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_PORT_H_INCLUDED_
8#define _NXT_PORT_H_INCLUDED_
9
10
11typedef enum {
12 NXT_PORT_MSG_LAST = 0x100,
13 NXT_PORT_MSG_CLOSE_FD = 0x200,
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_PORT_H_INCLUDED_
8#define _NXT_PORT_H_INCLUDED_
9
10
11typedef enum {
12 NXT_PORT_MSG_LAST = 0x100,
13 NXT_PORT_MSG_CLOSE_FD = 0x200,
14 NXT_PORT_MSG_SYNC = 0x400,
14
15 NXT_PORT_MSG_MASK = 0xFF,
16
17 _NXT_PORT_MSG_QUIT = 0,
18 _NXT_PORT_MSG_NEW_PORT,
19 _NXT_PORT_MSG_CHANGE_FILE,
20 _NXT_PORT_MSG_MMAP,
21 _NXT_PORT_MSG_DATA,

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

27 _NXT_PORT_MSG_RPC_ERROR,
28
29 NXT_PORT_MSG_MAX,
30
31 NXT_PORT_MSG_QUIT = _NXT_PORT_MSG_QUIT | NXT_PORT_MSG_LAST,
32 NXT_PORT_MSG_NEW_PORT = _NXT_PORT_MSG_NEW_PORT | NXT_PORT_MSG_LAST,
33 NXT_PORT_MSG_CHANGE_FILE = _NXT_PORT_MSG_CHANGE_FILE | NXT_PORT_MSG_LAST,
34 NXT_PORT_MSG_MMAP = _NXT_PORT_MSG_MMAP | NXT_PORT_MSG_LAST |
15
16 NXT_PORT_MSG_MASK = 0xFF,
17
18 _NXT_PORT_MSG_QUIT = 0,
19 _NXT_PORT_MSG_NEW_PORT,
20 _NXT_PORT_MSG_CHANGE_FILE,
21 _NXT_PORT_MSG_MMAP,
22 _NXT_PORT_MSG_DATA,

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

28 _NXT_PORT_MSG_RPC_ERROR,
29
30 NXT_PORT_MSG_MAX,
31
32 NXT_PORT_MSG_QUIT = _NXT_PORT_MSG_QUIT | NXT_PORT_MSG_LAST,
33 NXT_PORT_MSG_NEW_PORT = _NXT_PORT_MSG_NEW_PORT | NXT_PORT_MSG_LAST,
34 NXT_PORT_MSG_CHANGE_FILE = _NXT_PORT_MSG_CHANGE_FILE | NXT_PORT_MSG_LAST,
35 NXT_PORT_MSG_MMAP = _NXT_PORT_MSG_MMAP | NXT_PORT_MSG_LAST |
35 NXT_PORT_MSG_CLOSE_FD,
36 NXT_PORT_MSG_CLOSE_FD | NXT_PORT_MSG_SYNC,
36 NXT_PORT_MSG_DATA = _NXT_PORT_MSG_DATA,
37 NXT_PORT_MSG_DATA_LAST = _NXT_PORT_MSG_DATA | NXT_PORT_MSG_LAST,
38 NXT_PORT_MSG_REMOVE_PID = _NXT_PORT_MSG_REMOVE_PID | NXT_PORT_MSG_LAST,
39 NXT_PORT_MSG_READY = _NXT_PORT_MSG_READY | NXT_PORT_MSG_LAST,
40 NXT_PORT_MSG_START_WORKER = _NXT_PORT_MSG_START_WORKER |
41 NXT_PORT_MSG_LAST,
42 NXT_PORT_MSG_SOCKET = _NXT_PORT_MSG_SOCKET | NXT_PORT_MSG_LAST,
43 NXT_PORT_MSG_RPC_READY = _NXT_PORT_MSG_RPC_READY,

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

61
62
63typedef struct {
64 nxt_queue_link_t link;
65 nxt_buf_t *buf;
66 size_t share;
67 nxt_fd_t fd;
68 nxt_bool_t close_fd;
37 NXT_PORT_MSG_DATA = _NXT_PORT_MSG_DATA,
38 NXT_PORT_MSG_DATA_LAST = _NXT_PORT_MSG_DATA | NXT_PORT_MSG_LAST,
39 NXT_PORT_MSG_REMOVE_PID = _NXT_PORT_MSG_REMOVE_PID | NXT_PORT_MSG_LAST,
40 NXT_PORT_MSG_READY = _NXT_PORT_MSG_READY | NXT_PORT_MSG_LAST,
41 NXT_PORT_MSG_START_WORKER = _NXT_PORT_MSG_START_WORKER |
42 NXT_PORT_MSG_LAST,
43 NXT_PORT_MSG_SOCKET = _NXT_PORT_MSG_SOCKET | NXT_PORT_MSG_LAST,
44 NXT_PORT_MSG_RPC_READY = _NXT_PORT_MSG_RPC_READY,

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

62
63
64typedef struct {
65 nxt_queue_link_t link;
66 nxt_buf_t *buf;
67 size_t share;
68 nxt_fd_t fd;
69 nxt_bool_t close_fd;
70 nxt_bool_t opened;
69 nxt_port_msg_t port_msg;
70
71 nxt_work_t work;
72 nxt_event_engine_t *engine;
73 nxt_mp_t *mem_pool;
74} nxt_port_send_msg_t;
75
76

--- 110 unchanged lines hidden ---
71 nxt_port_msg_t port_msg;
72
73 nxt_work_t work;
74 nxt_event_engine_t *engine;
75 nxt_mp_t *mem_pool;
76} nxt_port_send_msg_t;
77
78

--- 110 unchanged lines hidden ---