Home | History | Annotate | Download | only in include

Lines Matching refs:fd

14 int sync_pipe_create(int fd[])
16 return pipe (fd);
19 int sync_pipe_close(int fd[])
23 if (fd[0] != -1)
24 r = close (fd[0]);
25 if (fd[1] != -1)
26 r |= close (fd[1]);
30 int sync_pipe_wait(int fd[])
35 if (fd[1] != -1) {
36 close (fd[1]);
37 fd[1] = -1;
40 r = read (fd[0], &buf, 1);
47 int sync_pipe_wait_select(int fd[], long tv_sec)
57 if (fd[1] != -1) {
58 close (fd[1]);
59 fd[1] = -1;
63 FD_SET(fd[0], &rfds);
65 r = select(fd[0] + 1, &rfds, NULL, NULL, &tv);
68 if (FD_ISSET(fd[0], &rfds)) {
69 return sync_pipe_wait(fd);
76 int sync_pipe_notify(int fd[])
81 if (fd[0] != -1) {
82 close (fd[0]);
83 fd[0] = -1;
86 r = write (fd[1], &buf, 1);