Lines Matching refs:fds

45 msg_open(struct msg_fds *fds)  in msg_open()  argument
47 if (pipe(fds->pfd) == -1) in msg_open()
49 if (pipe(fds->cfd) == -1) { in msg_open()
50 close(fds->pfd[0]); in msg_open()
51 close(fds->pfd[1]); in msg_open()
58 msg_close(struct msg_fds *fds) in msg_close() argument
60 CLOSEFD(fds->pfd[0]); in msg_close()
61 CLOSEFD(fds->pfd[1]); in msg_close()
62 CLOSEFD(fds->cfd[0]); in msg_close()
63 CLOSEFD(fds->cfd[1]); in msg_close()
67 msg_write_child(const char *info, struct msg_fds *fds, void *msg, size_t len) in msg_write_child() argument
70 CLOSEFD(fds->cfd[1]); in msg_write_child()
71 CLOSEFD(fds->pfd[0]); in msg_write_child()
74 rv = write(fds->pfd[1], msg, len); in msg_write_child()
78 rv = read(fds->cfd[0], msg, len); in msg_write_child()
85 msg_write_parent(const char *info, struct msg_fds *fds, void *msg, size_t len) in msg_write_parent() argument
88 CLOSEFD(fds->pfd[1]); in msg_write_parent()
89 CLOSEFD(fds->cfd[0]); in msg_write_parent()
92 rv = write(fds->cfd[1], msg, len); in msg_write_parent()
96 rv = read(fds->pfd[0], msg, len); in msg_write_parent()
103 msg_read_parent(const char *info, struct msg_fds *fds, void *msg, size_t len) in msg_read_parent() argument
106 CLOSEFD(fds->pfd[1]); in msg_read_parent()
107 CLOSEFD(fds->cfd[0]); in msg_read_parent()
110 rv = read(fds->pfd[0], msg, len); in msg_read_parent()
114 rv = write(fds->cfd[1], msg, len); in msg_read_parent()
121 msg_read_child(const char *info, struct msg_fds *fds, void *msg, size_t len) in msg_read_child() argument
124 CLOSEFD(fds->cfd[1]); in msg_read_child()
125 CLOSEFD(fds->pfd[0]); in msg_read_child()
128 rv = read(fds->cfd[0], msg, len); in msg_read_child()
132 rv = write(fds->pfd[1], msg, len); in msg_read_child()
138 #define PARENT_TO_CHILD(info, fds, msg) \ argument
139 SYSCALL_REQUIRE(msg_write_child(info " to child " # fds, &fds, &msg, \
142 #define CHILD_FROM_PARENT(info, fds, msg) \ argument
143 FORKEE_ASSERT(msg_read_parent(info " from parent " # fds, &fds, &msg, \
146 #define CHILD_TO_PARENT(info, fds, msg) \ argument
147 FORKEE_ASSERT(msg_write_parent(info " to parent " # fds, &fds, &msg, \
150 #define PARENT_FROM_CHILD(info, fds, msg) \ argument
151 SYSCALL_REQUIRE(msg_read_child(info " from parent " # fds, &fds, &msg, \