Lines Matching refs:comm_pipes

108 struct comm_pipes {  struct
113 static int setup_comm_pipes(struct comm_pipes *comm_pipes) in setup_comm_pipes() argument
115 if (pipe(comm_pipes->child_ready) < 0) in setup_comm_pipes()
117 if (pipe(comm_pipes->parent_ready) < 0) { in setup_comm_pipes()
118 close(comm_pipes->child_ready[0]); in setup_comm_pipes()
119 close(comm_pipes->child_ready[1]); in setup_comm_pipes()
126 static void close_comm_pipes(struct comm_pipes *comm_pipes) in close_comm_pipes() argument
128 close(comm_pipes->child_ready[0]); in close_comm_pipes()
129 close(comm_pipes->child_ready[1]); in close_comm_pipes()
130 close(comm_pipes->parent_ready[0]); in close_comm_pipes()
131 close(comm_pipes->parent_ready[1]); in close_comm_pipes()
135 struct comm_pipes *comm_pipes) in child_memcmp_fn() argument
144 write(comm_pipes->child_ready[1], "0", 1); in child_memcmp_fn()
145 while (read(comm_pipes->parent_ready[0], &buf, 1) != 1) in child_memcmp_fn()
153 struct comm_pipes *comm_pipes) in child_vmsplice_memcmp_fn() argument
185 write(comm_pipes->child_ready[1], "0", 1); in child_vmsplice_memcmp_fn()
186 while (read(comm_pipes->parent_ready[0], &buf, 1) != 1) in child_vmsplice_memcmp_fn()
199 typedef int (*child_fn)(char *mem, size_t size, struct comm_pipes *comm_pipes);
204 struct comm_pipes comm_pipes; in do_test_cow_in_parent() local
208 ret = setup_comm_pipes(&comm_pipes); in do_test_cow_in_parent()
219 exit(fn(mem, size, &comm_pipes)); in do_test_cow_in_parent()
222 while (read(comm_pipes.child_ready[0], &buf, 1) != 1) in do_test_cow_in_parent()
234 write(comm_pipes.parent_ready[1], "0", 1); in do_test_cow_in_parent()
242 write(comm_pipes.parent_ready[1], "0", 1); in do_test_cow_in_parent()
263 close_comm_pipes(&comm_pipes); in do_test_cow_in_parent()
297 struct comm_pipes comm_pipes; in do_test_vmsplice_in_parent() local
307 ret = setup_comm_pipes(&comm_pipes); in do_test_vmsplice_in_parent()
331 write(comm_pipes.child_ready[1], "0", 1); in do_test_vmsplice_in_parent()
332 while (read(comm_pipes.parent_ready[0], &buf, 1) != 1) in do_test_vmsplice_in_parent()
348 while (read(comm_pipes.child_ready[0], &buf, 1) != 1) in do_test_vmsplice_in_parent()
354 write(comm_pipes.parent_ready[1], "0", 1); in do_test_vmsplice_in_parent()
388 close_comm_pipes(&comm_pipes); in do_test_vmsplice_in_parent()
407 struct comm_pipes comm_pipes; in do_test_iouring() local
417 ret = setup_comm_pipes(&comm_pipes); in do_test_iouring()
469 write(comm_pipes.child_ready[1], "0", 1); in do_test_iouring()
470 while (read(comm_pipes.parent_ready[0], &buf, 1) != 1) in do_test_iouring()
475 while (read(comm_pipes.child_ready[0], &buf, 1) != 1) in do_test_iouring()
541 write(comm_pipes.parent_ready[1], "0", 1); in do_test_iouring()
553 close_comm_pipes(&comm_pipes); in do_test_iouring()
579 struct comm_pipes comm_pipes; in do_test_ro_pin() local
595 ret = setup_comm_pipes(&comm_pipes); in do_test_ro_pin()
615 write(comm_pipes.child_ready[1], "0", 1); in do_test_ro_pin()
616 while (read(comm_pipes.parent_ready[0], &buf, 1) != 1) in do_test_ro_pin()
622 while (read(comm_pipes.child_ready[0], &buf, 1) != 1) in do_test_ro_pin()
631 write(comm_pipes.parent_ready[1], "0", 1); in do_test_ro_pin()
691 write(comm_pipes.parent_ready[1], "0", 1); in do_test_ro_pin()
700 close_comm_pipes(&comm_pipes); in do_test_ro_pin()
1223 struct comm_pipes comm_pipes; in do_test_anon_thp_collapse() local
1227 ret = setup_comm_pipes(&comm_pipes); in do_test_anon_thp_collapse()
1289 exit(child_memcmp_fn(mem, size, &comm_pipes)); in do_test_anon_thp_collapse()
1292 exit(child_memcmp_fn(mem, size / 2, &comm_pipes)); in do_test_anon_thp_collapse()
1296 &comm_pipes)); in do_test_anon_thp_collapse()
1303 while (read(comm_pipes.child_ready[0], &buf, 1) != 1) in do_test_anon_thp_collapse()
1318 write(comm_pipes.parent_ready[1], "0", 1); in do_test_anon_thp_collapse()
1329 write(comm_pipes.parent_ready[1], "0", 1); in do_test_anon_thp_collapse()
1340 write(comm_pipes.parent_ready[1], "0", 1); in do_test_anon_thp_collapse()
1350 close_comm_pipes(&comm_pipes); in do_test_anon_thp_collapse()