Lines Matching defs:interrupt_pipe
191 int *interrupt_pipe;
193 interrupt_pipe = token;
194 if (interrupt_pipe == NULL) return;
196 if (interrupt_pipe[0] >= 0)
198 close(interrupt_pipe[0]);
199 interrupt_pipe[0] = -1;
202 if (interrupt_pipe[1] >= 0)
204 close(interrupt_pipe[1]);
205 interrupt_pipe[1] = -1;
209 free(interrupt_pipe);
215 int *interrupt_pipe;
217 interrupt_pipe = (int *)malloc(2 * sizeof(int));
218 if (interrupt_pipe == NULL) return NULL;
220 if (pipe(interrupt_pipe) < 0)
223 interrupt_pipe[0] = -1;
224 interrupt_pipe[1] = -1;
228 fcntl(interrupt_pipe[0], F_SETFD, FD_CLOEXEC | O_NONBLOCK);
229 fcntl(interrupt_pipe[1], F_SETFD, FD_CLOEXEC | O_NONBLOCK);
232 pthread_setspecific(interrupt_pipe_key, interrupt_pipe);
234 return interrupt_pipe;
255 int *interrupt_pipe;
257 interrupt_pipe = token;
259 if ((interrupt_pipe == NULL) || (interrupt_pipe_enabled == 0)) return;
261 oldwrite = interrupt_pipe[1];
262 interrupt_pipe[1] = -1;
1164 int *interrupt_pipe;
1174 interrupt_pipe = NULL;
1325 if (interrupt_pipe_enabled != 0) interrupt_pipe = pthread_getspecific(interrupt_pipe_key);
1356 if ((interrupt_pipe_enabled != 0) && (interrupt_pipe != NULL))
1358 if (interrupt_pipe[0] >= 0)
1360 FD_SET(interrupt_pipe[0], &dsmask);
1361 nfds = MAX(s, interrupt_pipe[0]) + 1;
1389 if ((interrupt_pipe_enabled != 0) && (interrupt_pipe != NULL) && ((interrupt_pipe[0] < 0) || (FD_ISSET(interrupt_pipe[0], &dsmask))))