Line | Count | Source (jump to first uncovered line) |
1 | | |
2 | | /* |
3 | | * Copyright (C) Igor Sysoev |
4 | | * Copyright (C) NGINX, Inc. |
5 | | */ |
6 | | |
7 | | #ifndef _NXT_BUF_H_INCLUDED_ |
8 | | #define _NXT_BUF_H_INCLUDED_ |
9 | | |
10 | | |
11 | | /* |
12 | | * There are four types of buffers. They are different sizes, so they |
13 | | * should be allocated by appropriate nxt_buf_XXX_alloc() function. |
14 | | * |
15 | | * 1) Memory-only buffers, their size is less than nxt_buf_t size, it |
16 | | * is equal to offsetof(nxt_buf_t, file), that is it is nxt_buf_t |
17 | | * without file and mmap part. The buffers are frequently used, so |
18 | | * the reduction allows to save 20-32 bytes depending on platform. |
19 | | * |
20 | | * 2) Memory/file buffers, on Unix their size is exactly nxt_buf_t size, |
21 | | * since nxt_mem_map_file_ctx_t() is empty macro. On Windows the size |
22 | | * equals offsetof(nxt_buf_t, mmap), that is it is nxt_buf_t without |
23 | | * memory map context part. The buffers can contain both memory and |
24 | | * file pointers at once, or only memory or file pointers. |
25 | | * |
26 | | * 3) Memory mapped buffers are similar to the memory/file buffers. Their |
27 | | * size is exactly nxt_buf_t size. The buffers can contain both memory |
28 | | * and file pointers at once, or only memory or file pointers. If a |
29 | | * buffer is not currently mapped in memory, its mapping size is stored |
30 | | * in the mem.end field and available via nxt_buf_mem_size() macro. |
31 | | * |
32 | | * 4) Sync buffers, their size is the same size as memory-only buffers |
33 | | * size. A sync buffer can be smaller but for memory pool cache |
34 | | * purpose it is better to allocate it as frequently used memory-only |
35 | | * buffer. The buffers are used to synchronize pipeline processing |
36 | | * completion, because data buffers in the pipeline can be completed |
37 | | * and freed before their final output will even be passed to a peer. |
38 | | * For this purpose a sync buffer is allocated with the stop flag which |
39 | | * stops buffer chain completion processing on the sync buffer in |
40 | | * nxt_sendbuf_update() and nxt_sendbuf_completion(). |
41 | | * Clearing the stop flag allows to continue completion processing. |
42 | | * |
43 | | * The last flag means the end of the output and must be set only |
44 | | * in a sync buffer. The last flag is not permitted in memory and |
45 | | * file buffers since it requires special handling while conversion |
46 | | * one buffer to another. |
47 | | * |
48 | | * The nxt_buf_used_size() macro treats a sync buffer as a memory-only |
49 | | * buffer which has NULL pointers, thus the buffer content size is zero. |
50 | | * If allocated size of sync buffer would be lesser than memory-only |
51 | | * buffer, then the special memory flag would be required because |
52 | | * currently presence of memory part is indicated by non-NULL pointer |
53 | | * to a content in memory. |
54 | | * |
55 | | * All types of buffers can have the flush flag that means the buffer |
56 | | * should be sent as much as possible. |
57 | | */ |
58 | | |
59 | | typedef struct { |
60 | | u_char *pos; |
61 | | u_char *free; |
62 | | u_char *start; |
63 | | u_char *end; |
64 | | } nxt_buf_mem_t; |
65 | | |
66 | | |
67 | | struct nxt_buf_s { |
68 | | void *data; |
69 | | nxt_work_handler_t completion_handler; |
70 | | void *parent; |
71 | | |
72 | | /* |
73 | | * The next link, flags, and nxt_buf_mem_t should |
74 | | * reside together to improve cache locality. |
75 | | */ |
76 | | nxt_buf_t *next; |
77 | | |
78 | | uint32_t retain; |
79 | | |
80 | | uint8_t cache_hint; |
81 | | |
82 | | uint8_t is_file:1; |
83 | | uint8_t is_mmap:1; |
84 | | uint8_t is_port_mmap:1; |
85 | | uint8_t is_sync:1; |
86 | | uint8_t is_nobuf:1; |
87 | | uint8_t is_flush:1; |
88 | | uint8_t is_last:1; |
89 | | uint8_t is_port_mmap_sent:1; |
90 | | uint8_t is_ts:1; |
91 | | |
92 | | nxt_buf_mem_t mem; |
93 | | |
94 | | /* The file and mmap parts are not allocated by nxt_buf_mem_alloc(). */ |
95 | | nxt_file_t *file; |
96 | | nxt_off_t file_pos; |
97 | | nxt_off_t file_end; |
98 | | |
99 | | /* The mmap part is not allocated by nxt_buf_file_alloc(). */ |
100 | | nxt_mem_map_file_ctx_t (mmap) |
101 | | }; |
102 | | |
103 | | |
104 | 0 | #define NXT_BUF_SYNC_SIZE offsetof(nxt_buf_t, mem.free) |
105 | 0 | #define NXT_BUF_MEM_SIZE offsetof(nxt_buf_t, file) |
106 | 0 | #define NXT_BUF_FILE_SIZE sizeof(nxt_buf_t) |
107 | 0 | #define NXT_BUF_MMAP_SIZE NXT_BUF_FILE_SIZE |
108 | | #define NXT_BUF_PORT_MMAP_SIZE NXT_BUF_MEM_SIZE |
109 | | |
110 | | |
111 | 0 | #define NXT_BUF_SYNC_NOBUF 1 |
112 | 0 | #define NXT_BUF_SYNC_FLUSH 2 |
113 | 0 | #define NXT_BUF_SYNC_LAST 4 |
114 | | |
115 | | |
116 | | #define nxt_buf_is_mem(b) \ |
117 | 0 | ((b)->mem.pos != NULL) |
118 | | |
119 | | |
120 | | #define nxt_buf_is_file(b) \ |
121 | 0 | ((b)->is_file) |
122 | | |
123 | | #define nxt_buf_set_file(b) \ |
124 | 0 | (b)->is_file = 1 |
125 | | |
126 | | #define nxt_buf_clear_file(b) \ |
127 | | (b)->is_file = 0 |
128 | | |
129 | | |
130 | | #define nxt_buf_is_mmap(b) \ |
131 | | ((b)->is_mmap) |
132 | | |
133 | | #define nxt_buf_set_mmap(b) \ |
134 | 0 | (b)->is_mmap = 1 |
135 | | |
136 | | #define nxt_buf_clear_mmap(b) \ |
137 | | (b)->is_mmap = 0 |
138 | | |
139 | | |
140 | | #define nxt_buf_is_port_mmap(b) \ |
141 | 0 | ((b)->is_port_mmap) |
142 | | |
143 | | #define nxt_buf_set_port_mmap(b) \ |
144 | 0 | (b)->is_port_mmap = 1 |
145 | | |
146 | | #define nxt_buf_clear_port_mmap(b) \ |
147 | | (b)->is_port_mmap = 0 |
148 | | |
149 | | |
150 | | #define nxt_buf_is_sync(b) \ |
151 | 0 | ((b)->is_sync) |
152 | | |
153 | | #define nxt_buf_set_sync(b) \ |
154 | 0 | (b)->is_sync = 1 |
155 | | |
156 | | #define nxt_buf_clear_sync(b) \ |
157 | | (b)->is_sync = 0 |
158 | | |
159 | | |
160 | | #define nxt_buf_is_nobuf(b) \ |
161 | | ((b)->is_nobuf) |
162 | | |
163 | | #define nxt_buf_set_nobuf(b) \ |
164 | | (b)->is_nobuf = 1 |
165 | | |
166 | | #define nxt_buf_clear_nobuf(b) \ |
167 | | (b)->is_nobuf = 0 |
168 | | |
169 | | |
170 | | #define nxt_buf_is_flush(b) \ |
171 | 0 | ((b)->is_flush) |
172 | | |
173 | | #define nxt_buf_set_flush(b) \ |
174 | | (b)->is_flush = 1 |
175 | | |
176 | | #define nxt_buf_clear_flush(b) \ |
177 | | (b)->is_flush = 0 |
178 | | |
179 | | |
180 | | #define nxt_buf_is_last(b) \ |
181 | 0 | ((b)->is_last) |
182 | | |
183 | | #define nxt_buf_set_last(b) \ |
184 | 0 | (b)->is_last = 1 |
185 | | |
186 | | #define nxt_buf_clear_last(b) \ |
187 | | (b)->is_last = 0 |
188 | | |
189 | | |
190 | | #define nxt_buf_mem_set_size(bm, size) \ |
191 | 0 | do { \ |
192 | 0 | (bm)->start = NULL; \ |
193 | 0 | (bm)->end = (void *) size; \ |
194 | 0 | } while (0) |
195 | | |
196 | | |
197 | | #define nxt_buf_mem_size(bm) \ |
198 | 0 | ((bm)->end - (bm)->start) |
199 | | |
200 | | |
201 | | #define nxt_buf_mem_used_size(bm) \ |
202 | 0 | ((bm)->free - (bm)->pos) |
203 | | |
204 | | |
205 | | #define nxt_buf_mem_free_size(bm) \ |
206 | 0 | ((bm)->end - (bm)->free) |
207 | | |
208 | | |
209 | | #define nxt_buf_used_size(b) \ |
210 | 0 | (nxt_buf_is_file(b) ? (b)->file_end - (b)->file_pos: \ |
211 | 0 | nxt_buf_mem_used_size(&(b)->mem)) |
212 | | |
213 | | |
214 | | NXT_EXPORT void nxt_buf_mem_init(nxt_buf_t *b, void *start, size_t size); |
215 | | NXT_EXPORT nxt_buf_t *nxt_buf_mem_alloc(nxt_mp_t *mp, size_t size, |
216 | | nxt_uint_t flags); |
217 | | NXT_EXPORT nxt_buf_t *nxt_buf_mem_ts_alloc(nxt_task_t *task, nxt_mp_t *mp, |
218 | | size_t size); |
219 | | NXT_EXPORT nxt_buf_t *nxt_buf_file_alloc(nxt_mp_t *mp, size_t size, |
220 | | nxt_uint_t flags); |
221 | | NXT_EXPORT nxt_buf_t *nxt_buf_mmap_alloc(nxt_mp_t *mp, size_t size); |
222 | | NXT_EXPORT nxt_buf_t *nxt_buf_sync_alloc(nxt_mp_t *mp, nxt_uint_t flags); |
223 | | |
224 | | NXT_EXPORT nxt_int_t nxt_buf_ts_handle(nxt_task_t *task, void *obj, void *data); |
225 | | |
226 | | NXT_EXPORT void nxt_buf_parent_completion(nxt_task_t *task, nxt_buf_t *parent); |
227 | | NXT_EXPORT nxt_buf_t *nxt_buf_make_plain(nxt_mp_t *mp, nxt_buf_t *src, |
228 | | size_t size); |
229 | | |
230 | | nxt_inline nxt_buf_t * |
231 | | nxt_buf_chk_make_plain(nxt_mp_t *mp, nxt_buf_t *src, size_t size) |
232 | 0 | { |
233 | 0 | if (nxt_slow_path(src != NULL && src->next != NULL)) { |
234 | 0 | return nxt_buf_make_plain(mp, src, size); |
235 | 0 | } |
236 | | |
237 | 0 | return src; |
238 | 0 | } Unexecuted instantiation: nxt_json_fuzz.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_lib.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_errno.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_malloc.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_file.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_process.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_process_title.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_port_socket.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_port_memory.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_port_rpc.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_port.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_random.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_mp.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_string.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_sprintf.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_log.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_murmur_hash.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_lvlhsh.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_array.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_buf.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_sendbuf.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_thread.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_thread_mutex.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_spinlock.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_thread_time.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_work_queue.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_service.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_log_moderation.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_event_engine.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_timer.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_runtime.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_conf.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_conf_validation.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_main_process.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_signal_handlers.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_controller.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_router.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_router_access_log.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_h1proto.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_status.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_request.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_response.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_error.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_route.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_route_addr.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_rewrite.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_set_headers.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_return.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_static.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_proxy.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_chunk_parse.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_variables.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_application.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_external.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_port_hash.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_websocket_accept.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_websocket.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_h1proto_websocket.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_fs.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_compression.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_epoll_engine.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_poll_engine.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_select_engine.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_linux_sendfile.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_clone.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_gmtime.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_time.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_mem_map.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_socket.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_socketpair.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_socket_msg.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_credential.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_isolation.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_signal.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_rbtree.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_utf8.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_parse.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_var.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_tstr.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_file_name.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_djb_hash.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_list.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_thread_pool.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_conn.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_conn_connect.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_conn_accept.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_conn_read.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_conn_write.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_conn_close.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_sockaddr.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_listen_socket.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_upstream.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_upstream_round_robin.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_http_parse.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_capability.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_sha1.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_websocket.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_fs_mount.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_recvbuf.c:nxt_buf_chk_make_plain Unexecuted instantiation: nxt_semaphore.c:nxt_buf_chk_make_plain |
239 | | |
240 | | #define nxt_buf_free(mp, b) \ |
241 | 0 | nxt_mp_free((mp), (b)) |
242 | | |
243 | | |
244 | | NXT_EXPORT void nxt_buf_chain_add(nxt_buf_t **head, nxt_buf_t *in); |
245 | | NXT_EXPORT size_t nxt_buf_chain_length(nxt_buf_t *b); |
246 | | |
247 | | nxt_inline nxt_buf_t * |
248 | | nxt_buf_cpy(nxt_buf_t *b, const void *src, size_t length) |
249 | 0 | { |
250 | 0 | nxt_memcpy(b->mem.free, src, length); |
251 | 0 | b->mem.free += length; |
252 | |
|
253 | 0 | return b; |
254 | 0 | } Unexecuted instantiation: nxt_json_fuzz.c:nxt_buf_cpy Unexecuted instantiation: nxt_lib.c:nxt_buf_cpy Unexecuted instantiation: nxt_errno.c:nxt_buf_cpy Unexecuted instantiation: nxt_malloc.c:nxt_buf_cpy Unexecuted instantiation: nxt_file.c:nxt_buf_cpy Unexecuted instantiation: nxt_process.c:nxt_buf_cpy Unexecuted instantiation: nxt_process_title.c:nxt_buf_cpy Unexecuted instantiation: nxt_port_socket.c:nxt_buf_cpy Unexecuted instantiation: nxt_port_memory.c:nxt_buf_cpy Unexecuted instantiation: nxt_port_rpc.c:nxt_buf_cpy Unexecuted instantiation: nxt_port.c:nxt_buf_cpy Unexecuted instantiation: nxt_random.c:nxt_buf_cpy Unexecuted instantiation: nxt_mp.c:nxt_buf_cpy Unexecuted instantiation: nxt_string.c:nxt_buf_cpy Unexecuted instantiation: nxt_sprintf.c:nxt_buf_cpy Unexecuted instantiation: nxt_log.c:nxt_buf_cpy Unexecuted instantiation: nxt_murmur_hash.c:nxt_buf_cpy Unexecuted instantiation: nxt_lvlhsh.c:nxt_buf_cpy Unexecuted instantiation: nxt_array.c:nxt_buf_cpy Unexecuted instantiation: nxt_buf.c:nxt_buf_cpy Unexecuted instantiation: nxt_sendbuf.c:nxt_buf_cpy Unexecuted instantiation: nxt_thread.c:nxt_buf_cpy Unexecuted instantiation: nxt_thread_mutex.c:nxt_buf_cpy Unexecuted instantiation: nxt_spinlock.c:nxt_buf_cpy Unexecuted instantiation: nxt_thread_time.c:nxt_buf_cpy Unexecuted instantiation: nxt_work_queue.c:nxt_buf_cpy Unexecuted instantiation: nxt_service.c:nxt_buf_cpy Unexecuted instantiation: nxt_log_moderation.c:nxt_buf_cpy Unexecuted instantiation: nxt_event_engine.c:nxt_buf_cpy Unexecuted instantiation: nxt_timer.c:nxt_buf_cpy Unexecuted instantiation: nxt_runtime.c:nxt_buf_cpy Unexecuted instantiation: nxt_conf.c:nxt_buf_cpy Unexecuted instantiation: nxt_conf_validation.c:nxt_buf_cpy Unexecuted instantiation: nxt_main_process.c:nxt_buf_cpy Unexecuted instantiation: nxt_signal_handlers.c:nxt_buf_cpy Unexecuted instantiation: nxt_controller.c:nxt_buf_cpy Unexecuted instantiation: nxt_router.c:nxt_buf_cpy Unexecuted instantiation: nxt_router_access_log.c:nxt_buf_cpy Unexecuted instantiation: nxt_h1proto.c:nxt_buf_cpy Unexecuted instantiation: nxt_status.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_request.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_response.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_error.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_route.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_route_addr.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_rewrite.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_set_headers.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_return.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_static.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_proxy.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_chunk_parse.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_variables.c:nxt_buf_cpy Unexecuted instantiation: nxt_application.c:nxt_buf_cpy Unexecuted instantiation: nxt_external.c:nxt_buf_cpy Unexecuted instantiation: nxt_port_hash.c:nxt_buf_cpy Unexecuted instantiation: nxt_websocket_accept.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_websocket.c:nxt_buf_cpy Unexecuted instantiation: nxt_h1proto_websocket.c:nxt_buf_cpy Unexecuted instantiation: nxt_fs.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_compression.c:nxt_buf_cpy Unexecuted instantiation: nxt_epoll_engine.c:nxt_buf_cpy Unexecuted instantiation: nxt_poll_engine.c:nxt_buf_cpy Unexecuted instantiation: nxt_select_engine.c:nxt_buf_cpy Unexecuted instantiation: nxt_linux_sendfile.c:nxt_buf_cpy Unexecuted instantiation: nxt_clone.c:nxt_buf_cpy Unexecuted instantiation: nxt_gmtime.c:nxt_buf_cpy Unexecuted instantiation: nxt_time.c:nxt_buf_cpy Unexecuted instantiation: nxt_mem_map.c:nxt_buf_cpy Unexecuted instantiation: nxt_socket.c:nxt_buf_cpy Unexecuted instantiation: nxt_socketpair.c:nxt_buf_cpy Unexecuted instantiation: nxt_socket_msg.c:nxt_buf_cpy Unexecuted instantiation: nxt_credential.c:nxt_buf_cpy Unexecuted instantiation: nxt_isolation.c:nxt_buf_cpy Unexecuted instantiation: nxt_signal.c:nxt_buf_cpy Unexecuted instantiation: nxt_rbtree.c:nxt_buf_cpy Unexecuted instantiation: nxt_utf8.c:nxt_buf_cpy Unexecuted instantiation: nxt_parse.c:nxt_buf_cpy Unexecuted instantiation: nxt_var.c:nxt_buf_cpy Unexecuted instantiation: nxt_tstr.c:nxt_buf_cpy Unexecuted instantiation: nxt_file_name.c:nxt_buf_cpy Unexecuted instantiation: nxt_djb_hash.c:nxt_buf_cpy Unexecuted instantiation: nxt_list.c:nxt_buf_cpy Unexecuted instantiation: nxt_thread_pool.c:nxt_buf_cpy Unexecuted instantiation: nxt_conn.c:nxt_buf_cpy Unexecuted instantiation: nxt_conn_connect.c:nxt_buf_cpy Unexecuted instantiation: nxt_conn_accept.c:nxt_buf_cpy Unexecuted instantiation: nxt_conn_read.c:nxt_buf_cpy Unexecuted instantiation: nxt_conn_write.c:nxt_buf_cpy Unexecuted instantiation: nxt_conn_close.c:nxt_buf_cpy Unexecuted instantiation: nxt_sockaddr.c:nxt_buf_cpy Unexecuted instantiation: nxt_listen_socket.c:nxt_buf_cpy Unexecuted instantiation: nxt_upstream.c:nxt_buf_cpy Unexecuted instantiation: nxt_upstream_round_robin.c:nxt_buf_cpy Unexecuted instantiation: nxt_http_parse.c:nxt_buf_cpy Unexecuted instantiation: nxt_capability.c:nxt_buf_cpy Unexecuted instantiation: nxt_sha1.c:nxt_buf_cpy Unexecuted instantiation: nxt_websocket.c:nxt_buf_cpy Unexecuted instantiation: nxt_fs_mount.c:nxt_buf_cpy Unexecuted instantiation: nxt_recvbuf.c:nxt_buf_cpy Unexecuted instantiation: nxt_semaphore.c:nxt_buf_cpy |
255 | | |
256 | | nxt_inline nxt_buf_t * |
257 | | nxt_buf_cpystr(nxt_buf_t *b, const nxt_str_t *str) |
258 | 0 | { |
259 | 0 | return nxt_buf_cpy(b, str->start, str->length); |
260 | 0 | } Unexecuted instantiation: nxt_json_fuzz.c:nxt_buf_cpystr Unexecuted instantiation: nxt_lib.c:nxt_buf_cpystr Unexecuted instantiation: nxt_errno.c:nxt_buf_cpystr Unexecuted instantiation: nxt_malloc.c:nxt_buf_cpystr Unexecuted instantiation: nxt_file.c:nxt_buf_cpystr Unexecuted instantiation: nxt_process.c:nxt_buf_cpystr Unexecuted instantiation: nxt_process_title.c:nxt_buf_cpystr Unexecuted instantiation: nxt_port_socket.c:nxt_buf_cpystr Unexecuted instantiation: nxt_port_memory.c:nxt_buf_cpystr Unexecuted instantiation: nxt_port_rpc.c:nxt_buf_cpystr Unexecuted instantiation: nxt_port.c:nxt_buf_cpystr Unexecuted instantiation: nxt_random.c:nxt_buf_cpystr Unexecuted instantiation: nxt_mp.c:nxt_buf_cpystr Unexecuted instantiation: nxt_string.c:nxt_buf_cpystr Unexecuted instantiation: nxt_sprintf.c:nxt_buf_cpystr Unexecuted instantiation: nxt_log.c:nxt_buf_cpystr Unexecuted instantiation: nxt_murmur_hash.c:nxt_buf_cpystr Unexecuted instantiation: nxt_lvlhsh.c:nxt_buf_cpystr Unexecuted instantiation: nxt_array.c:nxt_buf_cpystr Unexecuted instantiation: nxt_buf.c:nxt_buf_cpystr Unexecuted instantiation: nxt_sendbuf.c:nxt_buf_cpystr Unexecuted instantiation: nxt_thread.c:nxt_buf_cpystr Unexecuted instantiation: nxt_thread_mutex.c:nxt_buf_cpystr Unexecuted instantiation: nxt_spinlock.c:nxt_buf_cpystr Unexecuted instantiation: nxt_thread_time.c:nxt_buf_cpystr Unexecuted instantiation: nxt_work_queue.c:nxt_buf_cpystr Unexecuted instantiation: nxt_service.c:nxt_buf_cpystr Unexecuted instantiation: nxt_log_moderation.c:nxt_buf_cpystr Unexecuted instantiation: nxt_event_engine.c:nxt_buf_cpystr Unexecuted instantiation: nxt_timer.c:nxt_buf_cpystr Unexecuted instantiation: nxt_runtime.c:nxt_buf_cpystr Unexecuted instantiation: nxt_conf.c:nxt_buf_cpystr Unexecuted instantiation: nxt_conf_validation.c:nxt_buf_cpystr Unexecuted instantiation: nxt_main_process.c:nxt_buf_cpystr Unexecuted instantiation: nxt_signal_handlers.c:nxt_buf_cpystr Unexecuted instantiation: nxt_controller.c:nxt_buf_cpystr Unexecuted instantiation: nxt_router.c:nxt_buf_cpystr Unexecuted instantiation: nxt_router_access_log.c:nxt_buf_cpystr Unexecuted instantiation: nxt_h1proto.c:nxt_buf_cpystr Unexecuted instantiation: nxt_status.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_request.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_response.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_error.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_route.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_route_addr.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_rewrite.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_set_headers.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_return.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_static.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_proxy.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_chunk_parse.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_variables.c:nxt_buf_cpystr Unexecuted instantiation: nxt_application.c:nxt_buf_cpystr Unexecuted instantiation: nxt_external.c:nxt_buf_cpystr Unexecuted instantiation: nxt_port_hash.c:nxt_buf_cpystr Unexecuted instantiation: nxt_websocket_accept.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_websocket.c:nxt_buf_cpystr Unexecuted instantiation: nxt_h1proto_websocket.c:nxt_buf_cpystr Unexecuted instantiation: nxt_fs.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_compression.c:nxt_buf_cpystr Unexecuted instantiation: nxt_epoll_engine.c:nxt_buf_cpystr Unexecuted instantiation: nxt_poll_engine.c:nxt_buf_cpystr Unexecuted instantiation: nxt_select_engine.c:nxt_buf_cpystr Unexecuted instantiation: nxt_linux_sendfile.c:nxt_buf_cpystr Unexecuted instantiation: nxt_clone.c:nxt_buf_cpystr Unexecuted instantiation: nxt_gmtime.c:nxt_buf_cpystr Unexecuted instantiation: nxt_time.c:nxt_buf_cpystr Unexecuted instantiation: nxt_mem_map.c:nxt_buf_cpystr Unexecuted instantiation: nxt_socket.c:nxt_buf_cpystr Unexecuted instantiation: nxt_socketpair.c:nxt_buf_cpystr Unexecuted instantiation: nxt_socket_msg.c:nxt_buf_cpystr Unexecuted instantiation: nxt_credential.c:nxt_buf_cpystr Unexecuted instantiation: nxt_isolation.c:nxt_buf_cpystr Unexecuted instantiation: nxt_signal.c:nxt_buf_cpystr Unexecuted instantiation: nxt_rbtree.c:nxt_buf_cpystr Unexecuted instantiation: nxt_utf8.c:nxt_buf_cpystr Unexecuted instantiation: nxt_parse.c:nxt_buf_cpystr Unexecuted instantiation: nxt_var.c:nxt_buf_cpystr Unexecuted instantiation: nxt_tstr.c:nxt_buf_cpystr Unexecuted instantiation: nxt_file_name.c:nxt_buf_cpystr Unexecuted instantiation: nxt_djb_hash.c:nxt_buf_cpystr Unexecuted instantiation: nxt_list.c:nxt_buf_cpystr Unexecuted instantiation: nxt_thread_pool.c:nxt_buf_cpystr Unexecuted instantiation: nxt_conn.c:nxt_buf_cpystr Unexecuted instantiation: nxt_conn_connect.c:nxt_buf_cpystr Unexecuted instantiation: nxt_conn_accept.c:nxt_buf_cpystr Unexecuted instantiation: nxt_conn_read.c:nxt_buf_cpystr Unexecuted instantiation: nxt_conn_write.c:nxt_buf_cpystr Unexecuted instantiation: nxt_conn_close.c:nxt_buf_cpystr Unexecuted instantiation: nxt_sockaddr.c:nxt_buf_cpystr Unexecuted instantiation: nxt_listen_socket.c:nxt_buf_cpystr Unexecuted instantiation: nxt_upstream.c:nxt_buf_cpystr Unexecuted instantiation: nxt_upstream_round_robin.c:nxt_buf_cpystr Unexecuted instantiation: nxt_http_parse.c:nxt_buf_cpystr Unexecuted instantiation: nxt_capability.c:nxt_buf_cpystr Unexecuted instantiation: nxt_sha1.c:nxt_buf_cpystr Unexecuted instantiation: nxt_websocket.c:nxt_buf_cpystr Unexecuted instantiation: nxt_fs_mount.c:nxt_buf_cpystr Unexecuted instantiation: nxt_recvbuf.c:nxt_buf_cpystr Unexecuted instantiation: nxt_semaphore.c:nxt_buf_cpystr |
261 | | |
262 | | |
263 | | nxt_inline void |
264 | | nxt_buf_dummy_completion(nxt_task_t *task, void *obj, void *data) |
265 | 0 | { |
266 | 0 | } Unexecuted instantiation: nxt_json_fuzz.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_lib.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_errno.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_malloc.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_file.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_process.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_process_title.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_port_socket.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_port_memory.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_port_rpc.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_port.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_random.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_mp.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_string.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_sprintf.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_log.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_murmur_hash.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_lvlhsh.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_array.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_buf.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_sendbuf.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_thread.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_thread_mutex.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_spinlock.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_thread_time.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_work_queue.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_service.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_log_moderation.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_event_engine.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_timer.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_runtime.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_conf.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_conf_validation.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_main_process.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_signal_handlers.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_controller.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_router.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_router_access_log.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_h1proto.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_status.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_request.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_response.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_error.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_route.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_route_addr.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_rewrite.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_set_headers.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_return.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_static.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_proxy.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_chunk_parse.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_variables.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_application.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_external.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_port_hash.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_websocket_accept.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_websocket.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_h1proto_websocket.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_fs.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_compression.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_epoll_engine.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_poll_engine.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_select_engine.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_linux_sendfile.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_clone.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_gmtime.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_time.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_mem_map.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_socket.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_socketpair.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_socket_msg.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_credential.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_isolation.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_signal.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_rbtree.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_utf8.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_parse.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_var.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_tstr.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_file_name.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_djb_hash.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_list.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_thread_pool.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_conn.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_conn_connect.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_conn_accept.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_conn_read.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_conn_write.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_conn_close.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_sockaddr.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_listen_socket.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_upstream.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_upstream_round_robin.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_http_parse.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_capability.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_sha1.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_websocket.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_fs_mount.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_recvbuf.c:nxt_buf_dummy_completion Unexecuted instantiation: nxt_semaphore.c:nxt_buf_dummy_completion |
267 | | |
268 | | |
269 | | #endif /* _NXT_BUF_H_INCLIDED_ */ |