/tools/testing/selftests/net/ |
D | psock_lib.h | 71 static __maybe_unused void pair_udp_open(int fds[], uint16_t port) in pair_udp_open() argument 75 fds[0] = socket(PF_INET, SOCK_DGRAM, 0); in pair_udp_open() 76 fds[1] = socket(PF_INET, SOCK_DGRAM, 0); in pair_udp_open() 77 if (fds[0] == -1 || fds[1] == -1) { in pair_udp_open() 93 if (bind(fds[1], (void *) &daddr, sizeof(daddr))) { in pair_udp_open() 97 if (bind(fds[0], (void *) &saddr, sizeof(saddr))) { in pair_udp_open() 101 if (connect(fds[0], (void *) &daddr, sizeof(daddr))) { in pair_udp_open() 107 static __maybe_unused void pair_udp_send_char(int fds[], int num, char payload) in pair_udp_send_char() argument 114 if (write(fds[0], buf, sizeof(buf)) != sizeof(buf)) { in pair_udp_send_char() 118 if (read(fds[1], rbuf, sizeof(rbuf)) != sizeof(rbuf)) { in pair_udp_send_char() [all …]
|
D | psock_fanout.c | 189 static int sock_fanout_read(int fds[], char *rings[], const int expect[]) in sock_fanout_read() argument 193 ret[0] = sock_fanout_read_ring(fds[0], rings[0]); in sock_fanout_read() 194 ret[1] = sock_fanout_read_ring(fds[1], rings[1]); in sock_fanout_read() 223 int fds[2]; in test_control_group() local 227 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 20); in test_control_group() 228 if (fds[0] == -1) { in test_control_group() 246 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 20); in test_control_group() 247 if (fds[1] == -1) { in test_control_group() 251 if (close(fds[1]) || close(fds[0])) { in test_control_group() 263 int fds[2], fds_udp[2][2], ret; in test_datapath() local [all …]
|
/tools/perf/bench/ |
D | sched-messaging.c | 54 static void fdpair(int fds[2]) in fdpair() 57 if (pipe(fds) == 0) in fdpair() 60 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == 0) in fdpair() 206 int fds[2]; in group() local 214 fdpair(fds); in group() 217 ctx->in_fds[0] = fds[0]; in group() 218 ctx->in_fds[1] = fds[1]; in group() 224 snd_ctx->out_fds[i] = fds[1]; in group() 226 close(fds[0]); in group()
|
/tools/testing/selftests/powerpc/pmu/ebb/ |
D | ebb_on_child_test.c | 52 FAIL_IF(pipe(read_pipe.fds) == -1); in ebb_on_child() 53 FAIL_IF(pipe(write_pipe.fds) == -1); in ebb_on_child()
|
D | task_event_vs_ebb_test.c | 45 FAIL_IF(pipe(read_pipe.fds) == -1); in task_event_vs_ebb() 46 FAIL_IF(pipe(write_pipe.fds) == -1); in task_event_vs_ebb()
|
D | ebb_on_willing_child_test.c | 57 FAIL_IF(pipe(read_pipe.fds) == -1); in ebb_on_willing_child() 58 FAIL_IF(pipe(write_pipe.fds) == -1); in ebb_on_willing_child()
|
D | ebb_vs_cpu_event_test.c | 50 FAIL_IF(pipe(read_pipe.fds) == -1); in ebb_vs_cpu_event() 51 FAIL_IF(pipe(write_pipe.fds) == -1); in ebb_vs_cpu_event()
|
D | cpu_event_vs_ebb_test.c | 50 FAIL_IF(pipe(read_pipe.fds) == -1); in cpu_event_vs_ebb() 51 FAIL_IF(pipe(write_pipe.fds) == -1); in cpu_event_vs_ebb()
|
D | task_event_pinned_vs_ebb_test.c | 47 FAIL_IF(pipe(read_pipe.fds) == -1); in task_event_pinned_vs_ebb() 48 FAIL_IF(pipe(write_pipe.fds) == -1); in task_event_pinned_vs_ebb()
|
D | cpu_event_pinned_vs_ebb_test.c | 52 FAIL_IF(pipe(read_pipe.fds) == -1); in cpu_event_pinned_vs_ebb() 53 FAIL_IF(pipe(write_pipe.fds) == -1); in cpu_event_pinned_vs_ebb()
|
/tools/virtio/ |
D | virtio_test.c | 37 struct pollfd fds[1]; member 108 dev->fds[info->idx].fd = info->call; in vq_info_add() 109 dev->fds[info->idx].events = POLLIN; in vq_info_add() 146 poll(dev->fds, dev->nvqs, -1); in wait_for_interrupt() 148 if (dev->fds[i].revents & POLLIN) { in wait_for_interrupt() 149 read(dev->fds[i].fd, &val, sizeof val); in wait_for_interrupt()
|
/tools/usb/usbip/src/ |
D | usbipd.c | 490 struct pollfd *fds; in do_standalone_mode() local 542 fds = calloc(nsockfd, sizeof(struct pollfd)); in do_standalone_mode() 544 fds[i].fd = sockfdlist[i]; in do_standalone_mode() 545 fds[i].events = POLLIN; in do_standalone_mode() 558 r = ppoll(fds, nsockfd, &timeout, &sigmask); in do_standalone_mode() 564 if (fds[i].revents & POLLIN) { in do_standalone_mode() 576 free(fds); in do_standalone_mode()
|
/tools/testing/selftests/powerpc/pmu/ |
D | lib.h | 19 int fds[2]; member
|
D | lib.c | 152 if (pipe(read_pipe.fds) == -1) in eat_cpu() 155 if (pipe(write_pipe.fds) == -1) in eat_cpu()
|