Home
last modified time | relevance | path

Searched refs:bufs (Results 1 – 25 of 421) sorted by relevance

12345678910>>...17

/third_party/nghttp2/tests/
Dnghttp2_buf_test.c36 nghttp2_bufs bufs; in test_nghttp2_bufs_add() local
42 rv = nghttp2_bufs_init(&bufs, 1000, 3, mem); in test_nghttp2_bufs_add()
45 CU_ASSERT(bufs.cur->buf.pos == bufs.cur->buf.last); in test_nghttp2_bufs_add()
47 rv = nghttp2_bufs_add(&bufs, data, 493); in test_nghttp2_bufs_add()
49 CU_ASSERT(493 == nghttp2_buf_len(&bufs.cur->buf)); in test_nghttp2_bufs_add()
50 CU_ASSERT(493 == nghttp2_bufs_len(&bufs)); in test_nghttp2_bufs_add()
51 CU_ASSERT(507 == nghttp2_bufs_cur_avail(&bufs)); in test_nghttp2_bufs_add()
53 rv = nghttp2_bufs_add(&bufs, data, 507); in test_nghttp2_bufs_add()
55 CU_ASSERT(1000 == nghttp2_buf_len(&bufs.cur->buf)); in test_nghttp2_bufs_add()
56 CU_ASSERT(1000 == nghttp2_bufs_len(&bufs)); in test_nghttp2_bufs_add()
[all …]
Dnghttp2_hd_test.c49 nghttp2_bufs bufs; in test_nghttp2_hd_deflate() local
56 frame_pack_bufs_init(&bufs); in test_nghttp2_hd_deflate()
62 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva1, ARRLEN(nva1)); in test_nghttp2_hd_deflate()
63 blocklen = (ssize_t)nghttp2_bufs_len(&bufs); in test_nghttp2_hd_deflate()
67 CU_ASSERT(blocklen == inflate_hd(&inflater, &out, &bufs, 0, mem)); in test_nghttp2_hd_deflate()
73 nghttp2_bufs_reset(&bufs); in test_nghttp2_hd_deflate()
76 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva2, ARRLEN(nva2)); in test_nghttp2_hd_deflate()
77 blocklen = (ssize_t)nghttp2_bufs_len(&bufs); in test_nghttp2_hd_deflate()
81 CU_ASSERT(blocklen == inflate_hd(&inflater, &out, &bufs, 0, mem)); in test_nghttp2_hd_deflate()
87 nghttp2_bufs_reset(&bufs); in test_nghttp2_hd_deflate()
[all …]
Dnghttp2_frame_test.c75 nghttp2_bufs bufs; in test_nghttp2_frame_pack_headers() local
85 frame_pack_bufs_init(&bufs); in test_nghttp2_frame_pack_headers()
99 rv = nghttp2_frame_pack_headers(&bufs, &frame, &deflater); in test_nghttp2_frame_pack_headers()
101 nghttp2_bufs_rewind(&bufs); in test_nghttp2_frame_pack_headers()
104 CU_ASSERT(nghttp2_bufs_len(&bufs) > 0); in test_nghttp2_frame_pack_headers()
105 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_headers()
107 check_frame_header(nghttp2_bufs_len(&bufs) - NGHTTP2_FRAME_HDLEN, in test_nghttp2_frame_pack_headers()
114 hdblocklen = nghttp2_bufs_len(&bufs) - NGHTTP2_FRAME_HDLEN; in test_nghttp2_frame_pack_headers()
116 inflate_hd(&inflater, &out, &bufs, NGHTTP2_FRAME_HDLEN, mem)); in test_nghttp2_frame_pack_headers()
124 nghttp2_bufs_reset(&bufs); in test_nghttp2_frame_pack_headers()
[all …]
Dfailmalloc_test.c49 static void data_feed_init(data_feed *df, nghttp2_bufs *bufs) { in data_feed_init() argument
53 buf = &bufs->head->buf; in data_feed_init()
278 nghttp2_bufs bufs; in run_nghttp2_session_recv() local
292 rv = frame_pack_bufs_init(&bufs); in run_nghttp2_session_recv()
308 nghttp2_bufs_add(&bufs, NGHTTP2_CLIENT_MAGIC, NGHTTP2_CLIENT_MAGIC_LEN); in run_nghttp2_session_recv()
309 data_feed_init(&df, &bufs); in run_nghttp2_session_recv()
310 nghttp2_bufs_reset(&bufs); in run_nghttp2_session_recv()
327 nghttp2_frame_pack_settings(&bufs, &frame.settings); in run_nghttp2_session_recv()
329 data_feed_init(&df, &bufs); in run_nghttp2_session_recv()
330 nghttp2_bufs_reset(&bufs); in run_nghttp2_session_recv()
[all …]
Dnghttp2_session_test.c103 nghttp2_bufs *bufs) { in scripted_data_feed_init2() argument
113 for (ci = bufs->head; ci; ci = ci->next) { in scripted_data_feed_init2()
674 nghttp2_bufs bufs; in test_nghttp2_session_recv() local
686 frame_pack_bufs_init(&bufs); in test_nghttp2_session_recv()
703 rv = nghttp2_frame_pack_headers(&bufs, &frame.headers, &deflater); in test_nghttp2_session_recv()
707 scripted_data_feed_init2(&df, &bufs); in test_nghttp2_session_recv()
709 framelen = nghttp2_bufs_len(&bufs); in test_nghttp2_session_recv()
727 nghttp2_bufs_reset(&bufs); in test_nghttp2_session_recv()
732 nghttp2_frame_pack_priority(&bufs, &frame.priority); in test_nghttp2_session_recv()
736 scripted_data_feed_init2(&df, &bufs); in test_nghttp2_session_recv()
[all …]
/third_party/node/deps/nghttp2/lib/
Dnghttp2_buf.c116 int nghttp2_bufs_init(nghttp2_bufs *bufs, size_t chunk_length, size_t max_chunk, in nghttp2_bufs_init() argument
118 return nghttp2_bufs_init2(bufs, chunk_length, max_chunk, 0, mem); in nghttp2_bufs_init()
121 int nghttp2_bufs_init2(nghttp2_bufs *bufs, size_t chunk_length, in nghttp2_bufs_init2() argument
123 return nghttp2_bufs_init3(bufs, chunk_length, max_chunk, max_chunk, offset, in nghttp2_bufs_init2()
127 int nghttp2_bufs_init3(nghttp2_bufs *bufs, size_t chunk_length, in nghttp2_bufs_init3() argument
142 bufs->mem = mem; in nghttp2_bufs_init3()
143 bufs->offset = offset; in nghttp2_bufs_init3()
145 bufs->head = chain; in nghttp2_bufs_init3()
146 bufs->cur = bufs->head; in nghttp2_bufs_init3()
148 nghttp2_buf_shift_right(&bufs->cur->buf, offset); in nghttp2_bufs_init3()
[all …]
Dnghttp2_buf.h161 int nghttp2_bufs_init(nghttp2_bufs *bufs, size_t chunk_length, size_t max_chunk,
168 int nghttp2_bufs_init2(nghttp2_bufs *bufs, size_t chunk_length,
190 int nghttp2_bufs_init3(nghttp2_bufs *bufs, size_t chunk_length,
197 void nghttp2_bufs_free(nghttp2_bufs *bufs);
215 int nghttp2_bufs_wrap_init(nghttp2_bufs *bufs, uint8_t *begin, size_t len,
234 int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, const nghttp2_vec *vec,
241 void nghttp2_bufs_wrap_free(nghttp2_bufs *bufs);
257 int nghttp2_bufs_realloc(nghttp2_bufs *bufs, size_t chunk_length);
272 int nghttp2_bufs_add(nghttp2_bufs *bufs, const void *data, size_t len);
287 int nghttp2_bufs_addb(nghttp2_bufs *bufs, uint8_t b);
[all …]
Dnghttp2_frame.c305 static int frame_pack_headers_shared(nghttp2_bufs *bufs, in frame_pack_headers_shared() argument
311 buf = &bufs->head->buf; in frame_pack_headers_shared()
321 if (bufs->head != bufs->cur) { in frame_pack_headers_shared()
328 if (bufs->head != bufs->cur) { in frame_pack_headers_shared()
334 ce = bufs->cur; in frame_pack_headers_shared()
336 for (ci = bufs->head->next; ci != ce; ci = ci->next) { in frame_pack_headers_shared()
361 int nghttp2_frame_pack_headers(nghttp2_bufs *bufs, nghttp2_headers *frame, in nghttp2_frame_pack_headers() argument
367 assert(bufs->head == bufs->cur); in nghttp2_frame_pack_headers()
371 buf = &bufs->cur->buf; in nghttp2_frame_pack_headers()
377 rv = nghttp2_hd_deflate_hd_bufs(deflater, bufs, frame->nva, frame->nvlen); in nghttp2_frame_pack_headers()
[all …]
/third_party/nghttp2/lib/
Dnghttp2_buf.c116 int nghttp2_bufs_init(nghttp2_bufs *bufs, size_t chunk_length, size_t max_chunk, in nghttp2_bufs_init() argument
118 return nghttp2_bufs_init2(bufs, chunk_length, max_chunk, 0, mem); in nghttp2_bufs_init()
121 int nghttp2_bufs_init2(nghttp2_bufs *bufs, size_t chunk_length, in nghttp2_bufs_init2() argument
123 return nghttp2_bufs_init3(bufs, chunk_length, max_chunk, max_chunk, offset, in nghttp2_bufs_init2()
127 int nghttp2_bufs_init3(nghttp2_bufs *bufs, size_t chunk_length, in nghttp2_bufs_init3() argument
142 bufs->mem = mem; in nghttp2_bufs_init3()
143 bufs->offset = offset; in nghttp2_bufs_init3()
145 bufs->head = chain; in nghttp2_bufs_init3()
146 bufs->cur = bufs->head; in nghttp2_bufs_init3()
148 nghttp2_buf_shift_right(&bufs->cur->buf, offset); in nghttp2_bufs_init3()
[all …]
Dnghttp2_buf.h161 int nghttp2_bufs_init(nghttp2_bufs *bufs, size_t chunk_length, size_t max_chunk,
168 int nghttp2_bufs_init2(nghttp2_bufs *bufs, size_t chunk_length,
190 int nghttp2_bufs_init3(nghttp2_bufs *bufs, size_t chunk_length,
197 void nghttp2_bufs_free(nghttp2_bufs *bufs);
215 int nghttp2_bufs_wrap_init(nghttp2_bufs *bufs, uint8_t *begin, size_t len,
234 int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, const nghttp2_vec *vec,
241 void nghttp2_bufs_wrap_free(nghttp2_bufs *bufs);
257 int nghttp2_bufs_realloc(nghttp2_bufs *bufs, size_t chunk_length);
272 int nghttp2_bufs_add(nghttp2_bufs *bufs, const void *data, size_t len);
287 int nghttp2_bufs_addb(nghttp2_bufs *bufs, uint8_t b);
[all …]
Dnghttp2_frame.c305 static int frame_pack_headers_shared(nghttp2_bufs *bufs, in frame_pack_headers_shared() argument
311 buf = &bufs->head->buf; in frame_pack_headers_shared()
321 if (bufs->head != bufs->cur) { in frame_pack_headers_shared()
328 if (bufs->head != bufs->cur) { in frame_pack_headers_shared()
334 ce = bufs->cur; in frame_pack_headers_shared()
336 for (ci = bufs->head->next; ci != ce; ci = ci->next) { in frame_pack_headers_shared()
361 int nghttp2_frame_pack_headers(nghttp2_bufs *bufs, nghttp2_headers *frame, in nghttp2_frame_pack_headers() argument
367 assert(bufs->head == bufs->cur); in nghttp2_frame_pack_headers()
371 buf = &bufs->cur->buf; in nghttp2_frame_pack_headers()
377 rv = nghttp2_hd_deflate_hd_bufs(deflater, bufs, frame->nva, frame->nvlen); in nghttp2_frame_pack_headers()
[all …]
/third_party/vk-gl-cts/external/amber/src/src/vkscript/
Dparser_test.cc134 const auto& bufs = script->GetBuffers(); in TEST_F() local
135 ASSERT_EQ(1U, bufs.size()); in TEST_F()
137 bufs[0]->GetFormat()->GetFormatType()); in TEST_F()
149 const auto& bufs = script->GetBuffers(); in TEST_F() local
150 ASSERT_EQ(2U, bufs.size()); in TEST_F()
152 bufs[1]->GetFormat()->GetFormatType()); in TEST_F()
232 const auto& bufs = script->GetBuffers(); in TEST_F() local
233 ASSERT_EQ(2U, bufs.size()); in TEST_F()
235 bufs[0]->GetFormat()->GetFormatType()); in TEST_F()
238 bufs[1]->GetFormat()->GetFormatType()); in TEST_F()
[all …]
/third_party/alsa-utils/axfer/
Dframe-cache.c32 char **bufs = cache->buf; in align_frames_in_n() local
43 memmove(bufs[i], bufs[i] + offset, size); in align_frames_in_n()
44 buf_ptrs[i] = bufs[i] + size; in align_frames_in_n()
76 char **bufs = calloc(samples_per_frame, sizeof(*bufs)); in frame_cache_init() local
80 cache->buf = bufs; in frame_cache_init()
82 if (bufs == NULL || buf_ptrs == NULL) in frame_cache_init()
85 bufs[i] = calloc(frames_per_cache, bytes_per_sample); in frame_cache_init()
86 if (bufs[i] == NULL) in frame_cache_init()
88 buf_ptrs[i] = bufs[i]; in frame_cache_init()
103 char **bufs = cache->buf; in frame_cache_destroy() local
[all …]
Dmapper-multiple.c17 char **bufs; member
123 state->bufs = calloc(cntr_count, sizeof(char *)); in multiple_pre_process()
124 if (state->bufs == NULL) in multiple_pre_process()
138 state->bufs[i] = malloc(bytes_per_buffer); in multiple_pre_process()
139 if (state->bufs[i] == NULL) in multiple_pre_process()
141 memset(state->bufs[i], 0, bytes_per_buffer); in multiple_pre_process()
186 src_bufs = state->bufs; in multiple_muxer_process_frames()
217 dst_bufs = state->bufs; in multiple_demuxer_process_frames()
231 if (state->bufs) { in multiple_post_process()
233 if (state->bufs[i]) in multiple_post_process()
[all …]
/third_party/vk-gl-cts/external/amber/src/src/amberscript/
Dparser_bind_test.cc1391 const auto& bufs = pipeline->GetBuffers(); in TEST_F() local
1392 ASSERT_EQ(1U, bufs.size()); in TEST_F()
1393 EXPECT_EQ(BufferType::kUniform, bufs[0].type); in TEST_F()
1394 EXPECT_EQ(1U, bufs[0].descriptor_set); in TEST_F()
1395 EXPECT_EQ(2U, bufs[0].binding); in TEST_F()
1396 EXPECT_EQ(0U, bufs[0].descriptor_offset); in TEST_F()
1397 EXPECT_EQ(~0ULL, bufs[0].descriptor_range); in TEST_F()
1398 EXPECT_EQ(static_cast<uint32_t>(0), bufs[0].location); in TEST_F()
1400 bufs[0].buffer->GetFormat()->GetFormatType()); in TEST_F()
1429 const auto& bufs = pipeline->GetBuffers(); in TEST_F() local
[all …]
/third_party/nghttp2/fuzz/
Dfuzz_frames.cc39 nghttp2_bufs bufs; in check_frame_pack_headers() local
49 frame_pack_bufs_init(&bufs); in check_frame_pack_headers()
69 rv = nghttp2_frame_pack_headers(&bufs, &frame, &deflater); in check_frame_pack_headers()
71 unpack_framebuf((nghttp2_frame *)&oframe, &bufs); in check_frame_pack_headers()
73 inflate_hd(&inflater, &out, &bufs, NGHTTP2_FRAME_HDLEN, mem); in check_frame_pack_headers()
75 nghttp2_bufs_reset(&bufs); in check_frame_pack_headers()
89 nghttp2_bufs_free(&bufs); in check_frame_pack_headers()
99 nghttp2_bufs bufs; in check_frame_push_promise() local
109 frame_pack_bufs_init(&bufs); in check_frame_push_promise()
128 rv = nghttp2_frame_pack_push_promise(&bufs, &frame, &deflater); in check_frame_push_promise()
[all …]
/third_party/rust/crates/rustix/src/io/
Dread_write.rs93 pub fn readv<Fd: AsFd>(fd: Fd, bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> { in readv()
94 backend::io::syscalls::readv(fd.as_fd(), bufs) in readv()
108 pub fn writev<Fd: AsFd>(fd: Fd, bufs: &[IoSlice<'_>]) -> io::Result<usize> { in writev()
109 backend::io::syscalls::writev(fd.as_fd(), bufs) in writev()
121 pub fn preadv<Fd: AsFd>(fd: Fd, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io::Result<usize> { in preadv()
122 backend::io::syscalls::preadv(fd.as_fd(), bufs, offset) in preadv()
138 pub fn pwritev<Fd: AsFd>(fd: Fd, bufs: &[IoSlice<'_>], offset: u64) -> io::Result<usize> { in pwritev()
139 backend::io::syscalls::pwritev(fd.as_fd(), bufs, offset) in pwritev()
154 bufs: &mut [IoSliceMut<'_>], in preadv2()
158 backend::io::syscalls::preadv2(fd.as_fd(), bufs, offset, flags) in preadv2()
[all …]
/third_party/rust/crates/rustix/src/backend/libc/io/
Dsyscalls.rs92 pub(crate) fn readv(fd: BorrowedFd<'_>, bufs: &mut [IoSliceMut]) -> io::Result<usize> { in readv()
96 bufs.as_ptr().cast::<c::iovec>(), in readv()
97 min(bufs.len(), max_iov()) as c::c_int, in readv()
103 pub(crate) fn writev(fd: BorrowedFd<'_>, bufs: &[IoSlice]) -> io::Result<usize> { in writev()
107 bufs.as_ptr().cast::<c::iovec>(), in writev()
108 min(bufs.len(), max_iov()) as c::c_int, in writev()
117 bufs: &mut [IoSliceMut], in preadv()
125 bufs.as_ptr().cast::<c::iovec>(), in preadv()
126 min(bufs.len(), max_iov()) as c::c_int, in preadv()
134 pub(crate) fn pwritev(fd: BorrowedFd<'_>, bufs: &[IoSlice], offset: u64) -> io::Result<usize> { in pwritev()
[all …]
/third_party/alsa-utils/axfer/test/
Dgenerator.c66 char **bufs; in allocate_vector() local
71 bufs = calloc(samples_per_frame, sizeof(char *)); in allocate_vector()
72 if (bufs == NULL) in allocate_vector()
76 bufs[i] = calloc(frame_count, bytes_per_sample); in allocate_vector()
77 if (bufs[i] == NULL) { in allocate_vector()
79 free(bufs[i]); in allocate_vector()
80 free(bufs); in allocate_vector()
85 return bufs; in allocate_vector()
111 char **bufs = frame_buffer; in fill_vector() local
121 len = read(fd, bufs[i], size); in fill_vector()
[all …]
/third_party/lzma/C/
DBcj2.c40 if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC]) in Bcj2Dec_Decode()
45 code = (code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; in Bcj2Dec_Decode()
58 const Byte *cur = p->bufs[state]; in Bcj2Dec_Decode()
61 p->bufs[state] = cur + 4; in Bcj2Dec_Decode()
100 if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC]) in Bcj2Dec_Decode()
107 p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; in Bcj2Dec_Decode()
110 const Byte *src = p->bufs[BCJ2_STREAM_MAIN]; in Bcj2Dec_Decode()
179 const SizeT num = (SizeT)(src - p->bufs[BCJ2_STREAM_MAIN]); in Bcj2Dec_Decode()
180 p->bufs[BCJ2_STREAM_MAIN] = src; in Bcj2Dec_Decode()
200 p->bufs[BCJ2_STREAM_MAIN] += num; // = src; in Bcj2Dec_Decode()
[all …]
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/
D1-1.c69 char *bufs; in main() local
92 bufs = malloc(NUM_AIOCBS * BUF_SIZE); in main()
94 if (bufs == NULL) { in main()
100 if (write(fd, bufs, NUM_AIOCBS * BUF_SIZE) != (NUM_AIOCBS * BUF_SIZE)) { in main()
102 free(bufs); in main()
116 aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE]; in main()
143 free(bufs); in main()
156 free(bufs); in main()
169 free(bufs); in main()
184 free(bufs); in main()
[all …]
/third_party/libuv/src/win/
Dstream.c116 const uv_buf_t bufs[], in uv_write() argument
129 err = uv__tcp_write(loop, req, (uv_tcp_t*) handle, bufs, nbufs, cb); in uv_write()
133 loop, req, (uv_pipe_t*) handle, bufs, nbufs, NULL, cb); in uv_write()
136 err = uv__tty_write(loop, req, (uv_tty_t*) handle, bufs, nbufs, cb); in uv_write()
148 const uv_buf_t bufs[], in uv_write2() argument
156 return uv_write(req, handle, bufs, nbufs, cb); in uv_write2()
166 loop, req, (uv_pipe_t*) handle, bufs, nbufs, send_handle, cb); in uv_write2()
172 const uv_buf_t bufs[], in uv_try_write() argument
181 return uv__tcp_try_write((uv_tcp_t*) stream, bufs, nbufs); in uv_try_write()
183 return uv__tty_try_write((uv_tty_t*) stream, bufs, nbufs); in uv_try_write()
[all …]
/third_party/node/deps/uv/src/win/
Dstream.c116 const uv_buf_t bufs[], in uv_write() argument
129 err = uv__tcp_write(loop, req, (uv_tcp_t*) handle, bufs, nbufs, cb); in uv_write()
133 loop, req, (uv_pipe_t*) handle, bufs, nbufs, NULL, cb); in uv_write()
136 err = uv__tty_write(loop, req, (uv_tty_t*) handle, bufs, nbufs, cb); in uv_write()
148 const uv_buf_t bufs[], in uv_write2() argument
156 return uv_write(req, handle, bufs, nbufs, cb); in uv_write2()
166 loop, req, (uv_pipe_t*) handle, bufs, nbufs, send_handle, cb); in uv_write2()
172 const uv_buf_t bufs[], in uv_try_write() argument
181 return uv__tcp_try_write((uv_tcp_t*) stream, bufs, nbufs); in uv_try_write()
183 return uv__tty_try_write((uv_tty_t*) stream, bufs, nbufs); in uv_try_write()
[all …]
/third_party/ltp/lib/
Dtst_buffers.c131 void tst_buffers_alloc(struct tst_buffers bufs[]) in tst_buffers_alloc() argument
135 for (i = 0; bufs[i].ptr; i++) { in tst_buffers_alloc()
136 if (bufs[i].size) in tst_buffers_alloc()
137 *((void**)bufs[i].ptr) = tst_alloc(bufs[i].size); in tst_buffers_alloc()
138 else if (bufs[i].iov_sizes) in tst_buffers_alloc()
139 *((void**)bufs[i].ptr) = tst_iovec_alloc(bufs[i].iov_sizes); in tst_buffers_alloc()
141 *((void**)bufs[i].ptr) = tst_strdup(bufs[i].str); in tst_buffers_alloc()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/
D18-1.c47 char *bufs; in main() local
65 bufs = malloc(NUM_AIOCBS * BUF_SIZE); in main()
67 if (bufs == NULL) { in main()
78 aiocbs[0]->aio_buf = bufs; in main()
91 free(bufs); in main()
102 free(bufs); in main()
108 free(bufs); in main()

12345678910>>...17