1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-04-30 00:56:50 +03:00

(__pselect): No need to enable async cancellation here. This is done in select.

This commit is contained in:
Ulrich Drepper 2006-01-19 07:50:20 +00:00
parent 2f663a980c
commit b59b200e94

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1996,1997,1998,2001,2002,2003 Free Software Foundation, Inc. /* Copyright (C) 1996-1998,2001,2002,2003,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -22,7 +22,7 @@
#include <stddef.h> /* For NULL. */ #include <stddef.h> /* For NULL. */
#include <sys/time.h> #include <sys/time.h>
#include <sys/select.h> #include <sys/select.h>
#include <sysdep-cancel.h>
/* Check the first NFDS descriptors each in READFDS (if not NULL) for read /* 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 readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
@ -31,7 +31,7 @@
SIGMASK for this call. Returns the number of ready descriptors, or -1 for SIGMASK for this call. Returns the number of ready descriptors, or -1 for
errors. */ errors. */
static int static int
do_pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, __pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
const struct timespec *timeout, const sigset_t *sigmask) const struct timespec *timeout, const sigset_t *sigmask)
{ {
struct timeval tval; struct timeval tval;
@ -61,28 +61,5 @@ do_pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
return retval; return retval;
} }
int
__pselect (nfds, readfds, writefds, exceptfds, timeout, sigmask)
int nfds;
fd_set *readfds;
fd_set *writefds;
fd_set *exceptfds;
const struct timespec *timeout;
const sigset_t *sigmask;
{
if (SINGLE_THREAD_P)
return do_pselect (nfds, readfds, writefds, exceptfds, timeout, sigmask);
int oldtype = LIBC_CANCEL_ASYNC ();
int result = do_pselect (nfds, readfds, writefds, exceptfds, timeout,
sigmask);
LIBC_CANCEL_RESET (oldtype);
return result;
}
weak_alias (__pselect, pselect) weak_alias (__pselect, pselect)
strong_alias (__pselect, __libc_pselect) strong_alias (__pselect, __libc_pselect)