* cygwin.din (pselect): Export.
* select.cc (pselect): New function. * include/cygwin/version.h: Bump API minor number. * include/sys/select.h: Include signal.h. Declare pselect.
This commit is contained in:
parent
3b4ed14c7c
commit
d02099f239
|
@ -1,3 +1,10 @@
|
||||||
|
2005-04-19 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* cygwin.din (pselect): Export.
|
||||||
|
* select.cc (pselect): New function.
|
||||||
|
* include/cygwin/version.h: Bump API minor number.
|
||||||
|
* include/sys/select.h: Include signal.h. Declare pselect.
|
||||||
|
|
||||||
2005-04-18 Corinna Vinschen <corinna@vinschen.de>
|
2005-04-18 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler.h (enum conn_state): Add connect_failed state.
|
* fhandler.h (enum conn_state): Add connect_failed state.
|
||||||
|
|
|
@ -346,6 +346,7 @@ rexec = cygwin_rexec SIGFE
|
||||||
rresvport = cygwin_rresvport SIGFE
|
rresvport = cygwin_rresvport SIGFE
|
||||||
_select = cygwin_select SIGFE
|
_select = cygwin_select SIGFE
|
||||||
select = cygwin_select SIGFE
|
select = cygwin_select SIGFE
|
||||||
|
pselect SIGFE
|
||||||
send = cygwin_send SIGFE
|
send = cygwin_send SIGFE
|
||||||
sendmsg = cygwin_sendmsg SIGFE
|
sendmsg = cygwin_sendmsg SIGFE
|
||||||
sendto = cygwin_sendto SIGFE
|
sendto = cygwin_sendto SIGFE
|
||||||
|
|
|
@ -254,12 +254,13 @@ details. */
|
||||||
125: LD_PRELOAD/CW_HOOK available.
|
125: LD_PRELOAD/CW_HOOK available.
|
||||||
126: Export lsearch, lfind, timer_gettime.
|
126: Export lsearch, lfind, timer_gettime.
|
||||||
127: Export sigrelese.
|
127: Export sigrelese.
|
||||||
|
128: Export pselect.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||||
|
|
||||||
#define CYGWIN_VERSION_API_MAJOR 0
|
#define CYGWIN_VERSION_API_MAJOR 0
|
||||||
#define CYGWIN_VERSION_API_MINOR 127
|
#define CYGWIN_VERSION_API_MINOR 128
|
||||||
|
|
||||||
/* There is also a compatibity version number associated with the
|
/* There is also a compatibity version number associated with the
|
||||||
shared memory regions. It is incremented when incompatible
|
shared memory regions. It is incremented when incompatible
|
||||||
|
|
|
@ -23,10 +23,16 @@ details. */
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
/* Get definition of sigset_t. */
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
|
int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
|
||||||
fd_set *__exceptfds, struct timeval *__timeout));
|
fd_set *__exceptfds, struct timeval *__timeout));
|
||||||
|
int pselect __P ((int __n, fd_set *__readfds, fd_set *__writefds,
|
||||||
|
fd_set *__exceptfds, const struct timespec *__timeout,
|
||||||
|
const sigset_t *__set));
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ details. */
|
||||||
#include "fhandler.h"
|
#include "fhandler.h"
|
||||||
#include "dtable.h"
|
#include "dtable.h"
|
||||||
#include "cygheap.h"
|
#include "cygheap.h"
|
||||||
|
#include "pinfo.h"
|
||||||
#include "sigproc.h"
|
#include "sigproc.h"
|
||||||
#include "tty.h"
|
#include "tty.h"
|
||||||
#include "ntdll.h"
|
#include "ntdll.h"
|
||||||
|
@ -158,6 +159,33 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||||
return timeout ? 0 : sel.poll (readfds, writefds, exceptfds);
|
return timeout ? 0 : sel.poll (readfds, writefds, exceptfds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" int
|
||||||
|
pselect(int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||||
|
const struct timespec *ts, const sigset_t *set)
|
||||||
|
{
|
||||||
|
struct timeval tv;
|
||||||
|
sigset_t oldset = myself->getsigmask ();
|
||||||
|
|
||||||
|
if (ts)
|
||||||
|
{
|
||||||
|
if (check_invalid_read_struct_errno (ts))
|
||||||
|
return -1;
|
||||||
|
tv.tv_sec = ts->tv_sec;
|
||||||
|
tv.tv_usec = ts->tv_nsec / 1000;
|
||||||
|
}
|
||||||
|
if (set)
|
||||||
|
{
|
||||||
|
if (check_invalid_read_struct_errno (set))
|
||||||
|
return -1;
|
||||||
|
set_signal_mask (*set);
|
||||||
|
}
|
||||||
|
int ret = cygwin_select (maxfds, readfds, writefds, exceptfds,
|
||||||
|
ts ? &tv : NULL);
|
||||||
|
if (set)
|
||||||
|
set_signal_mask (oldset);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/* Call cleanup functions for all inspected fds. Gets rid of any
|
/* Call cleanup functions for all inspected fds. Gets rid of any
|
||||||
executing threads. */
|
executing threads. */
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue