Home
last modified time | relevance | path

Searched refs:data (Results 1 – 25 of 93) sorted by relevance

1234

/libuv/src/
H A Duv-data-getter-setters.c41 return handle->data; in uv_handle_get_data()
48 void uv_handle_set_data(uv_handle_t* handle, void* data) { in uv_handle_set_data() argument
49 handle->data = data; in uv_handle_set_data()
70 return req->data; in uv_req_get_data()
73 void uv_req_set_data(uv_req_t* req, void* data) { in uv_req_set_data() argument
74 req->data = data; in uv_req_set_data()
114 return loop->data; in uv_loop_get_data()
117 void uv_loop_set_data(uv_loop_t* loop, void* data) { in uv_loop_set_data() argument
118 loop->data = data; in uv_loop_set_data()
/libuv/test/
H A Dtest-threadpool.c28 static char data; variable
33 ASSERT_PTR_EQ(req->data, &data); in work_cb()
41 ASSERT_PTR_EQ(req->data, &data); in after_work_cb()
49 work_req.data = &data; in TEST_IMPL()
65 work_req.data = &data; in TEST_IMPL()
H A Dtest-getaddrinfo.c65 int* data = (int*)handle->data; in getaddrinfo_cuncurrent_cb() local
69 ASSERT_EQ(i, *data); in getaddrinfo_cuncurrent_cb()
77 free(data); in getaddrinfo_cuncurrent_cb()
188 int* data; in TEST_IMPL() local
193 data = (int*)malloc(sizeof(int)); in TEST_IMPL()
194 ASSERT_NOT_NULL(data); in TEST_IMPL()
195 *data = i; in TEST_IMPL()
196 getaddrinfo_handles[i].data = data; in TEST_IMPL()
H A Dtest-ping-pong.c62 if (handle->data) in ponger_on_close()
63 free(handle->data); in ponger_on_close()
87 free(req->data); in pinger_after_write()
114 req->data = NULL; in pinger_write_ping()
127 pinger = (pinger_t*) stream->data; in pinger_read_cb()
190 req->data = buf->base; in ponger_read_cb()
231 pinger->stream.tcp.data = pinger; in tcp_pinger_v6_new()
262 pinger->stream.tcp.data = pinger; in tcp_pinger_new()
291 pinger->stream.pipe.data = pinger; in pipe_pinger_new()
326 pinger->stream.pipe.data = pinger; in socketpair_pinger_new()
[all …]
H A Dtest-pipe-set-non-blocking.c72 char data[4096]; in TEST_IMPL() local
91 buf.len = sizeof(data); in TEST_IMPL()
92 buf.base = data; in TEST_IMPL()
93 memset(data, '.', sizeof(data)); in TEST_IMPL()
113 ASSERT_EQ(n, sizeof(data)); in TEST_IMPL()
H A Dbenchmark-async-pummel.c42 ACCESS_ONCE(const char*, handle->data) = stop; in async_cb()
45 while (ACCESS_ONCE(const char*, handle->data) != stopped) in async_cb()
56 while (ACCESS_ONCE(const char*, handle->data) == running) in pummel()
60 ACCESS_ONCE(const char*, handle->data) = stopped; in pummel()
75 ACCESS_ONCE(const char*, handle.data) = running; in test_async_pummel()
H A Dtest-poll-close-doesnt-corrupt-stack.c55 volatile uint32_t data[65536]; in close_socket_and_verify_stack() local
58 for (i = 0; i < ARRAY_SIZE(data); i++) in close_socket_and_verify_stack()
59 data[i] = MARKER; in close_socket_and_verify_stack()
66 for (i = 0; i < ARRAY_SIZE(data); i++) in close_socket_and_verify_stack()
67 ASSERT_EQ(data[i], MARKER); in close_socket_and_verify_stack()
H A Dtest-loop-close.c37 loop.data = &loop; in TEST_IMPL()
39 ASSERT_PTR_EQ(loop.data, (void*) &loop); in TEST_IMPL()
52 ASSERT_PTR_EQ(loop.data, (void*) &loop); in TEST_IMPL()
54 ASSERT_PTR_EQ(loop.data, (void*) &loop); in TEST_IMPL()
H A Dbenchmark-pound.c120 conn = (conn_rec*)req->data; in connect_cb()
162 conn_rec* p = (conn_rec*)handle->data; in close_cb()
220 p->conn_req.data = p; in tcp_make_connect()
221 p->write_req.data = p; in tcp_make_connect()
222 p->stream.data = p; in tcp_make_connect()
241 p->conn_req.data = p; in pipe_make_connect()
242 p->write_req.data = p; in pipe_make_connect()
243 p->stream.data = p; in pipe_make_connect()
H A Dtest-udp-ipv6.c44 static char data[10]; variable
133 ASSERT(!memcmp(buf->base, data, 9)); in ipv6_recv_ok()
183 ASSERT_EQ(9, snprintf(data, in do_test()
184 sizeof(data), in do_test()
187 buf = uv_buf_init(data, 9); in do_test()
188 printf("sending %s\n", data); in do_test()
H A Dbenchmark-million-async.c55 handle->data = handle; in async_cb()
68 if (handle->data != NULL) in timer_cb()
97 handle->data = NULL; in BENCHMARK_IMPL()
H A Dbenchmark-ping-pongs.c82 pinger = (pinger_t*)handle->data; in pinger_close_cb()
130 pinger = (pinger_t*)tcp->data; in pinger_read_cb()
167 pinger_t *pinger = (pinger_t*)req->handle->data; in pinger_connect_cb()
195 pinger->tcp.data = pinger; in pinger_new()
H A Dtest-tcp-write-in-a-row.c40 static char data[1024 * 1024 * 10]; variable
69 buf = uv_buf_init(data, sizeof(data)); in connect_cb()
H A Dtest-getters-setters.c70 ASSERT_PTR_EQ(loop->data, &cookie1); in TEST_IMPL()
79 pipe->data = &cookie2; in TEST_IMPL()
83 ASSERT_PTR_EQ(pipe->data, &cookie1); in TEST_IMPL()
/libuv/docs/code/queue-work/
H A Dmain.c18 int n = *(int *) req->data; in fib()
28 fprintf(stderr, "Done calculating %dth fibonacci\n", *(int *) req->data); in after_fib()
34 int data[FIB_UNTIL]; in main() local
38 data[i] = i; in main()
39 req[i].data = (void *) &data[i]; in main()
/libuv/src/win/
H A Dfs-fd-hash-inl.h65 struct uv__fd_hash_entry_group_s* data; member
87 uv__fd_hash[i].data = in uv__fd_hash_init()
114 group_ptr = bucket_ptr->data; \
153 new_group_ptr->next = bucket_ptr->data; in uv__fd_hash_add()
154 bucket_ptr->data = new_group_ptr; in uv__fd_hash_add()
158 entry_ptr = &bucket_ptr->data->entries[i]; in uv__fd_hash_add()
180 if (entry_ptr != &bucket_ptr->data->entries[i]) { in uv__fd_hash_remove()
181 *entry_ptr = bucket_ptr->data->entries[i]; in uv__fd_hash_remove()
186 struct uv__fd_hash_entry_group_s* old_group_ptr = bucket_ptr->data; in uv__fd_hash_remove()
187 bucket_ptr->data = old_group_ptr->next; in uv__fd_hash_remove()
H A Dreq-inl.h159 DELEGATE_STREAM_REQ(loop, req, read, data); in uv__process_reqs()
167 DELEGATE_STREAM_REQ(loop, req, accept, data); in uv__process_reqs()
179 uv__process_udp_recv_req(loop, (uv_udp_t*) req->data, req); in uv__process_reqs()
189 uv__process_async_wakeup_req(loop, (uv_async_t*) req->data, req); in uv__process_reqs()
193 uv__process_signal_req(loop, (uv_signal_t*) req->data, req); in uv__process_reqs()
197 uv__process_poll_req(loop, (uv_poll_t*) req->data, req); in uv__process_reqs()
201 uv__process_proc_exit(loop, (uv_process_t*) req->data); in uv__process_reqs()
205 uv__process_fs_event_req(loop, req, (uv_fs_event_t*) req->data); in uv__process_reqs()
H A Dprocess-stdio.c235 uv_pipe_t* parent_pipe = (uv_pipe_t*) fdopt.data.stream; in uv__stdio_create()
240 assert(fdopt.data.stream->type == UV_NAMED_PIPE); in uv__stdio_create()
241 assert(!(fdopt.data.stream->flags & UV_HANDLE_CONNECTION)); in uv__stdio_create()
242 assert(!(fdopt.data.stream->flags & UV_HANDLE_PIPESERVER)); in uv__stdio_create()
261 err = uv__duplicate_fd(loop, fdopt.data.fd, &child_handle); in uv__stdio_create()
265 if (fdopt.data.fd <= 2 && err == ERROR_INVALID_HANDLE) { in uv__stdio_create()
310 uv_stream_t* stream = fdopt.data.stream; in uv__stdio_create()
/libuv/docs/code/queue-cancel/
H A Dmain.c19 int n = *(int *) req->data; in fib()
30 fprintf(stderr, "Calculation of %d cancelled.\n", *(int *) req->data); in after_fib()
46 int data[FIB_UNTIL]; in main() local
49 data[i] = i; in main()
50 fib_reqs[i].data = (void *) &data[i]; in main()
/libuv/docs/src/
H A Dconf.py22 data = f.read()
24 m = re.search(r"""^#define UV_VERSION_MAJOR (\d+)$""", data, re.MULTILINE)
26 m = re.search(r"""^#define UV_VERSION_MINOR (\d+)$""", data, re.MULTILINE)
28 m = re.search(r"""^#define UV_VERSION_PATCH (\d+)$""", data, re.MULTILINE)
30 m = re.search(r"""^#define UV_VERSION_IS_RELEASE (\d)$""", data, re.MULTILINE)
32 m = re.search(r"""^#define UV_VERSION_SUFFIX \"(\w*)\"$""", data, re.MULTILINE)
H A Drequest.rst48 .. c:member:: void* uv_req_t.data
50 Space for user-defined arbitrary data. libuv does not use this field.
98 Returns `req->data`.
102 .. c:function:: void uv_req_set_data(uv_req_t* req, void* data)
104 Sets `req->data` to `data`.
/libuv/docs/code/progress/
H A Dmain.c13 int size = *((int*) req->data); in fake_download()
17 async.data = (void*) &percentage; in fake_download()
32 double percentage = *((double*) handle->data); in print_progress()
41 req.data = (void*) &size; in main()
/libuv/docs/code/dns/
H A Dmain.c23 char *data = (char*) malloc(sizeof(char) * (nread+1)); in on_read() local
24 data[nread] = '\0'; in on_read()
25 strncpy(data, buf->base, nread); in on_read()
27 fprintf(stderr, "%s", data); in on_read()
28 free(data); in on_read()
/libuv/docs/code/tty-gravity/
H A Dmain.c15 char data[500]; in update() local
18 buf.base = data; in update()
19 buf.len = sprintf(data, "\033[2J\033[H\033[%dB\033[%luC\033[42;37m%s", in update()
/libuv/docs/code/cgi/
H A Dmain.c13 uv_close((uv_handle_t*) req->data, NULL); in cleanup_handles()
33 child_stdio[1].data.stream = (uv_stream_t*) client; in invoke_cgi_script()
42 child_req.data = (void*) client; in invoke_cgi_script()

Completed in 34 milliseconds

1234