Lines Matching refs:r
93 int r; in recv_cb() local
124 r = uv_pipe_init(ctx.channel.loop, &recv->pipe, 0); in recv_cb()
126 r = uv_tcp_init(ctx.channel.loop, &recv->tcp); in recv_cb()
129 ASSERT_OK(r); in recv_cb()
131 r = uv_accept(handle, &recv->stream); in recv_cb()
132 ASSERT_OK(r); in recv_cb()
143 int r; in connect_cb() local
150 r = uv_write2(&ctx.write_req, in connect_cb()
155 ASSERT_OK(r); in connect_cb()
161 r = uv_write2(&ctx.write_req2, in connect_cb()
166 ASSERT_OK(r); in connect_cb()
168 r = uv_read_start((uv_stream_t*)&ctx.channel, alloc_cb, recv_cb); in connect_cb()
169 ASSERT_OK(r); in connect_cb()
175 int r; in run_test() local
178 r = uv_thread_create(&tid, ipc_send_recv_helper_threadproc, (void *) 42); in run_test()
179 ASSERT_OK(r); in run_test()
183 r = uv_pipe_init(uv_default_loop(), &ctx.channel, 1); in run_test()
184 ASSERT_OK(r); in run_test()
193 r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); in run_test()
194 ASSERT_OK(r); in run_test()
199 r = uv_thread_join(&tid); in run_test()
200 ASSERT_OK(r); in run_test()
207 int r; in run_ipc_send_recv_pipe() local
211 r = uv_pipe_init(uv_default_loop(), &ctx.send.pipe, 1); in run_ipc_send_recv_pipe()
212 ASSERT_OK(r); in run_ipc_send_recv_pipe()
214 r = uv_pipe_bind(&ctx.send.pipe, TEST_PIPENAME); in run_ipc_send_recv_pipe()
215 ASSERT_OK(r); in run_ipc_send_recv_pipe()
217 r = uv_pipe_init(uv_default_loop(), &ctx.send2.pipe, 1); in run_ipc_send_recv_pipe()
218 ASSERT_OK(r); in run_ipc_send_recv_pipe()
220 r = uv_pipe_bind(&ctx.send2.pipe, TEST_PIPENAME_2); in run_ipc_send_recv_pipe()
221 ASSERT_OK(r); in run_ipc_send_recv_pipe()
223 r = run_test(inprocess); in run_ipc_send_recv_pipe()
224 ASSERT_OK(r); in run_ipc_send_recv_pipe()
246 int r; in run_ipc_send_recv_tcp() local
252 r = uv_tcp_init(uv_default_loop(), &ctx.send.tcp); in run_ipc_send_recv_tcp()
253 ASSERT_OK(r); in run_ipc_send_recv_tcp()
255 r = uv_tcp_init(uv_default_loop(), &ctx.send2.tcp); in run_ipc_send_recv_tcp()
256 ASSERT_OK(r); in run_ipc_send_recv_tcp()
258 r = uv_tcp_bind(&ctx.send.tcp, (const struct sockaddr*) &addr, 0); in run_ipc_send_recv_tcp()
259 ASSERT_OK(r); in run_ipc_send_recv_tcp()
261 r = uv_tcp_bind(&ctx.send2.tcp, (const struct sockaddr*) &addr, 0); in run_ipc_send_recv_tcp()
262 ASSERT_OK(r); in run_ipc_send_recv_tcp()
264 r = run_test(inprocess); in run_ipc_send_recv_tcp()
265 ASSERT_OK(r); in run_ipc_send_recv_tcp()
307 int r; in read_cb() local
335 r = uv_pipe_init(ctx2.channel.loop, &recv->pipe, 0); in read_cb()
337 r = uv_tcp_init(ctx2.channel.loop, &recv->tcp); in read_cb()
340 ASSERT_OK(r); in read_cb()
342 r = uv_accept(handle, &recv->stream); in read_cb()
343 ASSERT_OK(r); in read_cb()
346 r = uv_write2(write_req, in read_cb()
352 ASSERT_OK(r); in read_cb()
357 int r; in send_recv_start() local
362 r = uv_read_start((uv_stream_t*)&ctx2.channel, alloc_cb, read_cb); in send_recv_start()
363 ASSERT_OK(r); in send_recv_start()
367 int r; in listen_cb() local
371 r = uv_accept((uv_stream_t*)&ctx2.listen, (uv_stream_t*)&ctx2.channel); in listen_cb()
372 ASSERT_OK(r); in listen_cb()
378 int r; in run_ipc_send_recv_helper() local
384 r = uv_pipe_init(loop, &ctx2.listen, 0); in run_ipc_send_recv_helper()
385 ASSERT_OK(r); in run_ipc_send_recv_helper()
387 r = uv_pipe_init(loop, &ctx2.channel, 1); in run_ipc_send_recv_helper()
388 ASSERT_OK(r); in run_ipc_send_recv_helper()
391 r = uv_pipe_bind(&ctx2.listen, TEST_PIPENAME_3); in run_ipc_send_recv_helper()
392 ASSERT_OK(r); in run_ipc_send_recv_helper()
394 r = uv_listen((uv_stream_t*)&ctx2.listen, SOMAXCONN, listen_cb); in run_ipc_send_recv_helper()
395 ASSERT_OK(r); in run_ipc_send_recv_helper()
397 r = uv_pipe_open(&ctx2.channel, 0); in run_ipc_send_recv_helper()
398 ASSERT_OK(r); in run_ipc_send_recv_helper()
404 r = uv_run(loop, UV_RUN_DEFAULT); in run_ipc_send_recv_helper()
405 ASSERT_OK(r); in run_ipc_send_recv_helper()
414 int r; in ipc_send_recv_helper() local
416 r = run_ipc_send_recv_helper(uv_default_loop(), 0); in ipc_send_recv_helper()
417 ASSERT_OK(r); in ipc_send_recv_helper()
424 int r; in ipc_send_recv_helper_threadproc() local
427 r = uv_loop_init(&loop); in ipc_send_recv_helper_threadproc()
428 ASSERT_OK(r); in ipc_send_recv_helper_threadproc()
430 r = run_ipc_send_recv_helper(&loop, 1); in ipc_send_recv_helper_threadproc()
431 ASSERT_OK(r); in ipc_send_recv_helper_threadproc()
433 r = uv_loop_close(&loop); in ipc_send_recv_helper_threadproc()
434 ASSERT_OK(r); in ipc_send_recv_helper_threadproc()