Home
last modified time | relevance | path

Searched refs:b (Results 1 – 25 of 115) sorted by relevance

12345

/unit/src/
H A Dnxt_buf.c47 b->mem.pos = b->mem.start; in nxt_buf_mem_alloc()
48 b->mem.free = b->mem.start; in nxt_buf_mem_alloc()
49 b->mem.end = b->mem.start + size; in nxt_buf_mem_alloc()
78 b->mem.pos = b->mem.start; in nxt_buf_mem_ts_alloc()
79 b->mem.free = b->mem.start; in nxt_buf_mem_ts_alloc()
80 b->mem.end = b->mem.start + size; in nxt_buf_mem_ts_alloc()
113 b->mem.pos = b->mem.start; in nxt_buf_file_alloc()
114 b->mem.free = b->mem.start; in nxt_buf_file_alloc()
115 b->mem.end = b->mem.start + size; in nxt_buf_file_alloc()
170 for (b = *head; b != NULL; b = b->next) { in nxt_buf_chain_add()
[all …]
H A Dnxt_buf_pool.c13 nxt_buf_t *b; in nxt_buf_pool_mem_alloc() local
15 b = bp->current; in nxt_buf_pool_mem_alloc()
17 if (b != NULL && b->mem.free < b->mem.end) { in nxt_buf_pool_mem_alloc()
21 b = bp->free; in nxt_buf_pool_mem_alloc()
23 if (b != NULL) { in nxt_buf_pool_mem_alloc()
57 if (b != NULL && b->mem.free < b->mem.end) { in nxt_buf_pool_file_alloc()
61 b = bp->free; in nxt_buf_pool_file_alloc()
141 nxt_mem_unmap(b->mem.start, &b->mmap, size); in nxt_buf_pool_free()
161 b->mem.pos = b->mem.start; in nxt_buf_pool_free()
162 b->mem.free = b->mem.start; in nxt_buf_pool_free()
[all …]
H A Dnxt_buf.h121 ((b)->is_file)
124 (b)->is_file = 1
127 (b)->is_file = 0
131 ((b)->is_mmap)
134 (b)->is_mmap = 1
151 ((b)->is_sync)
161 ((b)->is_nobuf)
171 ((b)->is_flush)
181 ((b)->is_last)
210 (nxt_buf_is_file(b) ? (b)->file_end - (b)->file_pos: \
[all …]
H A Dnxt_sendbuf.c29 for (b = sb->buf; b != NULL && total < sb->limit; b = b->next) { in nxt_sendbuf_mem_coalesce0()
39 size = b->mem.free - b->mem.pos; in nxt_sendbuf_mem_coalesce0()
99 for (b = sb->buf; b != NULL && total < sb->limit; b = b->next) { in nxt_sendbuf_mem_coalesce()
109 size = b->mem.free - b->mem.pos; in nxt_sendbuf_mem_coalesce()
180 size = b->file_end - b->file_pos; in nxt_sendbuf_file_coalesce()
190 b = b->next; in nxt_sendbuf_file_coalesce()
192 if (b == NULL || !nxt_buf_is_file(b)) { in nxt_sendbuf_file_coalesce()
307 size = b->mem.free - b->mem.pos; in nxt_sendbuf_copy()
322 b = b->next; in nxt_sendbuf_copy()
363 b->mem.pos = b->mem.free; in nxt_sendbuf_update()
[all …]
H A Dnxt_recvbuf.c16 nxt_buf_t *b; in nxt_recvbuf_mem_coalesce() local
22 for (b = rb->buf; b != NULL; b = b->next) { in nxt_recvbuf_mem_coalesce()
24 nxt_prefetch(b->next); in nxt_recvbuf_mem_coalesce()
26 size = b->mem.end - b->mem.free; in nxt_recvbuf_mem_coalesce()
28 if (b->mem.free != last) { in nxt_recvbuf_mem_coalesce()
45 last = b->mem.end; in nxt_recvbuf_mem_coalesce()
65 nxt_prefetch(b->next); in nxt_recvbuf_update()
67 if (!nxt_buf_is_sync(b)) { in nxt_recvbuf_update()
69 size = b->mem.end - b->mem.free; in nxt_recvbuf_update()
76 b->mem.free = b->mem.end; in nxt_recvbuf_update()
[all …]
H A Dnxt_websocket.c12 nxt_ntoh16(const uint8_t *b) in nxt_ntoh16() argument
14 return ((uint16_t) b[0]) << 8 | ((uint16_t) b[1]); in nxt_ntoh16()
21 b[0] = (v >> 8); in nxt_hton16()
22 b[1] = (v & 0xFFu); in nxt_hton16()
27 nxt_ntoh64(const uint8_t *b) in nxt_ntoh64() argument
43 b[0] = (v >> 56); in nxt_hton64()
44 b[1] = (v >> 48) & 0xFFu; in nxt_hton64()
45 b[2] = (v >> 40) & 0xFFu; in nxt_hton64()
46 b[3] = (v >> 32) & 0xFFu; in nxt_hton64()
47 b[4] = (v >> 24) & 0xFFu; in nxt_hton64()
[all …]
H A Dnxt_sha1.c22 ctx->b = 0xefcdab89; in nxt_sha1_init()
100 result[6] = (u_char) (ctx->b >> 8); in nxt_sha1_final()
101 result[7] = (u_char) ctx->b; in nxt_sha1_final()
125 #define F1(b, c, d) (((b) & (c)) | ((~(b)) & (d))) argument
126 #define F2(b, c, d) ((b) ^ (c) ^ (d)) argument
127 #define F3(b, c, d) (((b) & (c)) | ((b) & (d)) | ((c) & (d))) argument
158 uint32_t a, b, c, d, e, temp; in nxt_sha1_body() local
167 b = ctx->b; in nxt_sha1_body()
174 saved_b = b; in nxt_sha1_body()
279 b += saved_b; in nxt_sha1_body()
[all …]
H A Dnxt_http_chunk_parse.c49 for (b = in; b != NULL; b = next) { in nxt_http_chunk_parse()
176 b->completion_handler, task, b, b->parent); in nxt_http_chunk_parse()
204 nxt_buf_t *b; in nxt_http_chunk_buffer() local
214 **tail = b; in nxt_http_chunk_buffer()
215 *tail = &b->next; in nxt_http_chunk_buffer()
220 b->parent = in; in nxt_http_chunk_buffer()
222 b->mem.pos = p; in nxt_http_chunk_buffer()
223 b->mem.start = p; in nxt_http_chunk_buffer()
254 b = obj; in nxt_http_chunk_buf_completion()
256 nxt_debug(task, "buf completion: %p %p", b, b->mem.start); in nxt_http_chunk_buf_completion()
[all …]
H A Dnxt_buf_filter.c60 b = f->current; in nxt_buf_filter()
140 if (b != NULL && b->mem.pos == b->mem.free) { in nxt_buf_filter()
144 task, b, b->parent); in nxt_buf_filter()
176 nxt_buf_t *b; in nxt_buf_filter_nobuf() local
342 b = jbf->buffer; in nxt_buf_filter_file_job_completion()
346 jbf->file.name, b->file_pos, b->file_end); in nxt_buf_filter_file_job_completion()
370 b->next = NULL; in nxt_buf_filter_file_job_completion()
376 if (b->mem.pos == b->mem.free) { in nxt_buf_filter_file_job_completion()
406 b = obj; in nxt_buf_filter_buf_completion()
411 b, f->filter_file->job_file.file.name, b->file_pos, b->file_end); in nxt_buf_filter_buf_completion()
[all …]
H A Dnxt_fastcgi_record_parse.c49 for (b = in; b != NULL; b = b->next) { in nxt_fastcgi_record_parse()
52 **tail = b; in nxt_fastcgi_record_parse()
53 *tail = &b->next; in nxt_fastcgi_record_parse()
57 fp->pos = b->mem.pos; in nxt_fastcgi_record_parse()
213 task, b, b->parent); in nxt_fastcgi_record_parse()
254 nxt_buf_t *b; in nxt_fastcgi_buffer() local
278 **tail = b; in nxt_fastcgi_buffer()
279 *tail = &b->next; in nxt_fastcgi_buffer()
281 b->parent = in; in nxt_fastcgi_buffer()
283 b->mem.pos = p; in nxt_fastcgi_buffer()
[all …]
H A Dnxt_fastcgi_source.c220 *prev = b; in nxt_fastcgi_request_create()
225 size = b->mem.end - b->mem.free; in nxt_fastcgi_request_create()
285 if (b->mem.end - b->mem.free >= 16) { in nxt_fastcgi_request_create()
307 if (b->mem.end - b->mem.free < 16) { in nxt_fastcgi_request_create()
308 nxt_thread_log_debug("\"%*s\"", b->mem.free - b->mem.pos, b->mem.pos); in nxt_fastcgi_request_create()
325 nxt_thread_log_debug("\"%*s\"", b->mem.free - b->mem.pos, b->mem.pos); in nxt_fastcgi_request_create()
423 for (b = fsr->parse.out[1]; b != NULL; b = b->next) { in nxt_fastcgi_source_record_filter()
439 b->completion_handler(task, b, b->parent); in nxt_fastcgi_source_record_filter()
470 b = data; in nxt_fastcgi_source_header_filter()
517 b = b->next; in nxt_fastcgi_source_header_filter()
[all …]
H A Dnxt_http_websocket.c60 b = r->ws_frame; in nxt_http_websocket_client()
62 while (b != NULL && frame_size > 0) { in nxt_http_websocket_client()
88 next = b->next; in nxt_http_websocket_client()
89 b->next = NULL; in nxt_http_websocket_client()
93 b->completion_handler, task, b, b->parent); in nxt_http_websocket_client()
98 b = next; in nxt_http_websocket_client()
109 b = r->ws_frame; in nxt_http_websocket_client()
111 if (b != NULL) { in nxt_http_websocket_client()
115 nxt_memmove(b->mem.start, b->mem.pos, used_size); in nxt_http_websocket_client()
117 b->mem.pos = b->mem.start; in nxt_http_websocket_client()
[all …]
H A Dnxt_event_conn_job_sendfile.c69 sb.iobuf = &b; in nxt_event_conn_job_sendfile_start()
110 b = jbs->out; in nxt_event_conn_job_sendfile_handler()
126 b = nxt_sendbuf_update(b, ret); in nxt_event_conn_job_sendfile_handler()
182 b = jbs->out; in nxt_event_conn_job_sendfile_return()
188 b = nxt_event_conn_job_sendfile_completion(task, c, b); in nxt_event_conn_job_sendfile_return()
239 nxt_buf_t *b) in nxt_event_conn_job_sendfile_completion() argument
245 if (nxt_buf_is_mem(b) && b->mem.pos != b->mem.free) { in nxt_event_conn_job_sendfile_completion()
248 } else if (nxt_buf_is_file(b) && b->file_pos != b->file_end) { in nxt_event_conn_job_sendfile_completion()
253 b->completion_handler, task, b, b->parent); in nxt_event_conn_job_sendfile_completion()
255 b = b->next; in nxt_event_conn_job_sendfile_completion()
[all …]
H A Dnxt_http_source.c39 nxt_buf_t *b);
152 *prev = b; in nxt_http_source_request_create()
180 nxt_thread_log_debug("\"%*s\"", b->mem.free - b->mem.pos, b->mem.pos); in nxt_http_source_request_create()
194 b = data; in nxt_http_source_status_filter()
250 if (b->parent->mem.pos == b->parent->mem.end) { in nxt_http_source_status_filter()
252 b->mem.pos - b->mem.start, b->mem.start); in nxt_http_source_status_filter()
267 b = data; in nxt_http_source_header_filter()
439 for (b = us->stream->out; b != NULL; b = b->next) { in nxt_http_source_header_ready()
505 b = data; in nxt_http_source_chunk_filter()
509 b = nxt_http_chunk_parse(task, &hsc->parse, b); in nxt_http_source_chunk_filter()
[all …]
H A Dnxt_port_socket.c214 b->mem.pos = b->mem.free; in nxt_port_socket_write2()
217 b->completion_handler, task, b, b->parent); in nxt_port_socket_write2()
660 b->mem.pos = b->mem.free; in nxt_port_buf_completion()
663 b->file_pos = b->file_end; in nxt_port_buf_completion()
670 nxt_work_queue_add(wq, b->completion_handler, task, b, b->parent); in nxt_port_buf_completion()
677 return b; in nxt_port_buf_completion()
1290 b->completion_handler, task, b, b->parent); in nxt_port_read_msg_process()
1313 b->mem.pos = b->mem.start; in nxt_port_buf_alloc()
1314 b->mem.free = b->mem.start; in nxt_port_buf_alloc()
1363 for (b = msg->buf; b != NULL; b = next) { in nxt_port_error_handler()
[all …]
H A Dnxt_solaris_sendfilev.c25 nxt_solaris_event_conn_io_sendfilev(nxt_event_conn_t *c, nxt_buf_t *b, in nxt_solaris_event_conn_io_sendfilev() argument
38 return nxt_event_conn_io_sendbuf(c, b, limit); in nxt_solaris_event_conn_io_sendfilev()
43 size = nxt_solaris_buf_coalesce(b, sfv, &nsfv, &sync, limit); in nxt_solaris_event_conn_io_sendfilev()
103 for (total = 0; b != NULL && total < limit; b = b->next) { in nxt_solaris_buf_coalesce()
105 if (nxt_buf_is_file(b)) { in nxt_solaris_buf_coalesce()
107 fd = b->file->fd; in nxt_solaris_buf_coalesce()
108 pos = b->file_pos; in nxt_solaris_buf_coalesce()
109 size = b->file_end - pos; in nxt_solaris_buf_coalesce()
119 } else if (nxt_buf_is_mem(b)) { in nxt_solaris_buf_coalesce()
122 pos = (uintptr_t) b->mem.pos; in nxt_solaris_buf_coalesce()
[all …]
H A Dnxt_port_memory.c132 b = obj; in nxt_port_mmap_buf_completion()
149 if (b->is_port_mmap_sent && b->mem.pos > b->mem.start) { in nxt_port_mmap_buf_completion()
166 "%PI->%PI,%d,%d", b, b->mem.start, b->mem.end - b->mem.start, in nxt_port_mmap_buf_completion()
716 b->mem.pos = b->mem.start; in nxt_port_mmap_get_buf()
717 b->mem.free = b->mem.start; in nxt_port_mmap_get_buf()
721 b, b->mem.start, b->mem.end - b->mem.start, in nxt_port_mmap_get_buf()
826 b->mem.pos = b->mem.start; in nxt_port_mmap_get_incoming_buf()
827 b->mem.free = b->mem.start + mmap_msg->size; in nxt_port_mmap_get_incoming_buf()
834 b, b->mem.start, b->mem.end - b->mem.start, in nxt_port_mmap_get_incoming_buf()
904 for (b = msg->buf; b != NULL; b = b->next) { in nxt_port_mmap_read()
[all …]
H A Dnxt_sendbuf.h72 ssize_t nxt_linux_event_conn_io_sendfile(nxt_conn_t *c, nxt_buf_t *b,
78 ssize_t nxt_freebsd_event_conn_io_sendfile(nxt_conn_t *c, nxt_buf_t *b,
84 ssize_t nxt_solaris_event_conn_io_sendfilev(nxt_conn_t *c, nxt_buf_t *b,
90 ssize_t nxt_macosx_event_conn_io_sendfile(nxt_conn_t *c, nxt_buf_t *b,
96 ssize_t nxt_aix_event_conn_io_send_file(nxt_conn_t *c, nxt_buf_t *b,
102 ssize_t nxt_hpux_event_conn_io_sendfile(nxt_conn_t *c, nxt_buf_t *b,
106 ssize_t nxt_event_conn_io_sendbuf(nxt_conn_t *c, nxt_buf_t *b,
123 nxt_buf_t *b, size_t limit);
125 nxt_buf_t *nxt_sendbuf_update(nxt_buf_t *b, size_t sent);
127 nxt_buf_t *b);
[all …]
H A Dnxt_stream_source.c169 nxt_buf_t *b; in nxt_stream_source_read_ready() local
243 nxt_buf_t *b; in nxt_stream_source_read_done() local
302 *prev = b; in nxt_stream_source_process_buffers()
304 b->data = stream; in nxt_stream_source_process_buffers()
309 b->parent = in; in nxt_stream_source_process_buffers()
311 b->mem.pos = in->mem.free; in nxt_stream_source_process_buffers()
331 prev = &b->next; in nxt_stream_source_process_buffers()
348 b = obj; in nxt_stream_source_buf_completion()
357 stream = b->data; in nxt_stream_source_buf_completion()
361 parent->mem.pos = b->mem.pos; in nxt_stream_source_buf_completion()
[all …]
/unit/test/python/variables/
H A Dasgi.py4 body = b''
7 body += m.get('body', b'')
18 return b', '.join(res)
25 (b'content-type', get_header(b'content-type')),
26 (b'content-length', str(len(body)).encode()),
27 (b'request-method', scope['method'].encode()),
28 (b'request-uri', scope['path'].encode()),
29 (b'http-host', get_header(b'host')),
30 (b'http-version', scope['http_version'].encode()),
33 (b'scheme', scope['scheme'].encode()),
[all …]
/unit/test/python/targets/
H A Dasgi.py8 'headers': [(b'content-length', b'0')],
20 'headers': [(b'content-length', b'0')],
36 'headers': [(b'content-length', b'0')],
52 'headers': [(b'content-length', b'0')],
/unit/src/java/nginx/unit/
H A DOutputStream.java17 public void write(int b) throws IOException in write() argument
19 write(req_info_ptr, b); in write()
22 private static native void write(long req_info_ptr, int b); in write() argument
26 public void write(byte b[], int off, int len) throws IOException in write() argument
28 if (b == null) { in write()
30 } else if ((off < 0) || (off > b.length) || (len < 0) || in write()
31 ((off + len) > b.length) || ((off + len) < 0)) { in write()
37 write(req_info_ptr, b, off, len); in write()
40 private static native void write(long req_info_ptr, byte b[], int off, int len); in write() argument
H A DInputStream.java18 public int readLine(byte[] b, int off, int len) throws IOException { in readLine() argument
23 return readLine(req_info_ptr, b, off, len); in readLine()
26 private static native int readLine(long req_info_ptr, byte[] b, int off, int len); in readLine() argument
61 public int read(byte b[], int off, int len) throws IOException { in read() argument
62 if (b == null) { in read()
64 } else if (off < 0 || len < 0 || len > b.length - off) { in read()
70 return read(req_info_ptr, b, off, len); in read()
73 private static native int read(long req_info_ptr, byte b[], int off, int len); in read() argument
/unit/go/
H A Dunit.go21 b C.uintptr_t member
44 func (buf *cbuf) init_bytes(b []byte) {
45 buf.b = buf_ref(b)
46 buf.s = C.size_t(len(b))
57 var b [0]byte
58 return b[:0]
62 Data: unsafe.Pointer(uintptr(buf.b)),
82 b := uintptr(p) + uintptr(*(*C.uint32_t)(p))
84 return C.GoStringN((*C.char)(unsafe.Pointer(b)), l)
/unit/test/python/threads/
H A Dasgi.py16 delay = float(get_header(b'x-delay', 0))
25 (b'content-length', b'0'),
26 (b'x-thread', str(threading.currentThread().ident).encode()),

12345