Esempio n. 1
0
/* Check the first NFDS descriptors each in READFDS (if not NULL) for read
   readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
   (if not NULL) for exceptional conditions.  If TIMEOUT is not NULL, time out
   after waiting the interval specified therein.  Additionally set the sigmask
   SIGMASK for this call.  Returns the number of ready descriptors, or -1 for
   errors.  */
int
__pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
	   const struct timespec *timeout, const sigset_t *sigmask)
{
  return _hurd_select (nfds, NULL,
		       readfds, writefds, exceptfds, timeout, sigmask);
}
Esempio n. 2
0
/* Check the first NFDS descriptors each in READFDS (if not NULL) for read
   readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
   (if not NULL) for exceptional conditions.  If TIMEOUT is not NULL, time out
   after waiting the interval specified therein.  Returns the number of ready
   descriptors, or -1 for errors.  */
int
__select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
	  struct timeval *timeout)
{
  struct timespec ts, *to;

  if (timeout)
    {
      to = &ts;
      TIMEVAL_TO_TIMESPEC (timeout, to);
    }
  else
    to = NULL;

  return _hurd_select (nfds, NULL, readfds, writefds, exceptfds, to, NULL);
}
Esempio n. 3
0
int
ppoll (struct pollfd *fds, nfds_t nfds,
       const struct timespec *timeout, const sigset_t *sigmask)
{
  return _hurd_select (nfds, fds, NULL, NULL, NULL, timeout, sigmask);
}