Lines Matching refs:comm_pipes
74 struct comm_pipes { struct
79 static int setup_comm_pipes(struct comm_pipes *comm_pipes) in setup_comm_pipes() argument
81 if (pipe(comm_pipes->child_ready) < 0) in setup_comm_pipes()
83 if (pipe(comm_pipes->parent_ready) < 0) { in setup_comm_pipes()
84 close(comm_pipes->child_ready[0]); in setup_comm_pipes()
85 close(comm_pipes->child_ready[1]); in setup_comm_pipes()
92 static void close_comm_pipes(struct comm_pipes *comm_pipes) in close_comm_pipes() argument
94 close(comm_pipes->child_ready[0]); in close_comm_pipes()
95 close(comm_pipes->child_ready[1]); in close_comm_pipes()
96 close(comm_pipes->parent_ready[0]); in close_comm_pipes()
97 close(comm_pipes->parent_ready[1]); in close_comm_pipes()
101 struct comm_pipes *comm_pipes) in child_memcmp_fn() argument
110 write(comm_pipes->child_ready[1], "0", 1); in child_memcmp_fn()
111 while (read(comm_pipes->parent_ready[0], &buf, 1) != 1) in child_memcmp_fn()
119 struct comm_pipes *comm_pipes) in child_vmsplice_memcmp_fn() argument
151 write(comm_pipes->child_ready[1], "0", 1); in child_vmsplice_memcmp_fn()
152 while (read(comm_pipes->parent_ready[0], &buf, 1) != 1) in child_vmsplice_memcmp_fn()
165 typedef int (*child_fn)(char *mem, size_t size, struct comm_pipes *comm_pipes);
170 struct comm_pipes comm_pipes; in do_test_cow_in_parent() local
174 ret = setup_comm_pipes(&comm_pipes); in do_test_cow_in_parent()
185 exit(fn(mem, size, &comm_pipes)); in do_test_cow_in_parent()
188 while (read(comm_pipes.child_ready[0], &buf, 1) != 1) in do_test_cow_in_parent()
200 write(comm_pipes.parent_ready[1], "0", 1); in do_test_cow_in_parent()
208 write(comm_pipes.parent_ready[1], "0", 1); in do_test_cow_in_parent()
218 close_comm_pipes(&comm_pipes); in do_test_cow_in_parent()
249 struct comm_pipes comm_pipes; in do_test_vmsplice_in_parent() local
259 ret = setup_comm_pipes(&comm_pipes); in do_test_vmsplice_in_parent()
283 write(comm_pipes.child_ready[1], "0", 1); in do_test_vmsplice_in_parent()
284 while (read(comm_pipes.parent_ready[0], &buf, 1) != 1) in do_test_vmsplice_in_parent()
300 while (read(comm_pipes.child_ready[0], &buf, 1) != 1) in do_test_vmsplice_in_parent()
306 write(comm_pipes.parent_ready[1], "0", 1); in do_test_vmsplice_in_parent()
330 close_comm_pipes(&comm_pipes); in do_test_vmsplice_in_parent()
349 struct comm_pipes comm_pipes; in do_test_iouring() local
359 ret = setup_comm_pipes(&comm_pipes); in do_test_iouring()
411 write(comm_pipes.child_ready[1], "0", 1); in do_test_iouring()
412 while (read(comm_pipes.parent_ready[0], &buf, 1) != 1) in do_test_iouring()
417 while (read(comm_pipes.child_ready[0], &buf, 1) != 1) in do_test_iouring()
483 write(comm_pipes.parent_ready[1], "0", 1); in do_test_iouring()
495 close_comm_pipes(&comm_pipes); in do_test_iouring()
521 struct comm_pipes comm_pipes; in do_test_ro_pin() local
537 ret = setup_comm_pipes(&comm_pipes); in do_test_ro_pin()
557 write(comm_pipes.child_ready[1], "0", 1); in do_test_ro_pin()
558 while (read(comm_pipes.parent_ready[0], &buf, 1) != 1) in do_test_ro_pin()
564 while (read(comm_pipes.child_ready[0], &buf, 1) != 1) in do_test_ro_pin()
573 write(comm_pipes.parent_ready[1], "0", 1); in do_test_ro_pin()
633 write(comm_pipes.parent_ready[1], "0", 1); in do_test_ro_pin()
642 close_comm_pipes(&comm_pipes); in do_test_ro_pin()
1138 struct comm_pipes comm_pipes; in do_test_anon_thp_collapse() local
1142 ret = setup_comm_pipes(&comm_pipes); in do_test_anon_thp_collapse()
1204 exit(child_memcmp_fn(mem, size, &comm_pipes)); in do_test_anon_thp_collapse()
1207 exit(child_memcmp_fn(mem, size / 2, &comm_pipes)); in do_test_anon_thp_collapse()
1211 &comm_pipes)); in do_test_anon_thp_collapse()
1218 while (read(comm_pipes.child_ready[0], &buf, 1) != 1) in do_test_anon_thp_collapse()
1233 write(comm_pipes.parent_ready[1], "0", 1); in do_test_anon_thp_collapse()
1244 write(comm_pipes.parent_ready[1], "0", 1); in do_test_anon_thp_collapse()
1255 write(comm_pipes.parent_ready[1], "0", 1); in do_test_anon_thp_collapse()
1265 close_comm_pipes(&comm_pipes); in do_test_anon_thp_collapse()