Lines Matching refs:sem_fd
35 if (close(Semaphore.sem_fd[0]) == -1 || close(Semaphore.sem_fd[1]) == -1)
72 Semaphore.sem_fd[0] = Semaphore.sem_fd[1] = -1;
74 if ( (Semaphore.sem_fd[0] = open(pathname, O_RDONLY | O_NONBLOCK)) < 0)
76 if ( (Semaphore.sem_fd[1] = open(pathname, O_WRONLY | O_NONBLOCK)) < 0)
78 if ( (flags = fcntl(Semaphore.sem_fd[0], F_GETFL, 0)) < 0)
81 if (fcntl(Semaphore.sem_fd[0], F_SETFL, flags) < 0)
86 if (write(Semaphore.sem_fd[1], &c, 1) != 1)
97 close(Semaphore.sem_fd[0]); // ignore error
98 close(Semaphore.sem_fd[1]); // ignore error
122 if (write(Semaphore.sem_fd[1], &c, 1) == 1)
138 if (read(Semaphore.sem_fd[0], &c, 1) == 1)