diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2000-07-04 16:58:49 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2000-07-04 16:58:49 +0000 |
commit | afb7e7196a6dc16c145a455d6cf0761cbaeb7a48 (patch) | |
tree | df00f47f3e724366b081f190f7a122019c68bdc7 /winsup/cygwin/include/sys/poll.h | |
parent | f88cc353838d8e406545d08f98eea8ad4b4cac5c (diff) | |
download | cygnal-afb7e7196a6dc16c145a455d6cf0761cbaeb7a48.tar.gz cygnal-afb7e7196a6dc16c145a455d6cf0761cbaeb7a48.tar.bz2 cygnal-afb7e7196a6dc16c145a455d6cf0761cbaeb7a48.zip |
* poll.cc: New file. Implement `poll' system call.
* include/poll.h: Ditto.
* include/sys/poll.h: Ditto.
* Makefile.in: Add poll.o as dependency.
* cygwin.din: Add poll and _poll symbols.
Diffstat (limited to 'winsup/cygwin/include/sys/poll.h')
-rw-r--r-- | winsup/cygwin/include/sys/poll.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/winsup/cygwin/include/sys/poll.h b/winsup/cygwin/include/sys/poll.h new file mode 100644 index 000000000..c33639ebb --- /dev/null +++ b/winsup/cygwin/include/sys/poll.h @@ -0,0 +1,43 @@ +/* sys/poll.h + + Copyright 2000 Cygnus Solutions. + + This file is part of Cygwin. + + This software is a copyrighted work licensed under the terms of the + Cygwin license. Please consult the file "CYGWIN_LICENSE" for + details. */ + +#ifndef _SYS_POLL_H +#define _SYS_POLL_H + +#include <sys/cdefs.h> + +__BEGIN_DECLS + +#define POLLIN 1 /* Set if data to read. */ +#define POLLPRI 2 /* Set if urgent data to read. */ +#define POLLOUT 4 /* Set if writing data wouldn't block. */ +#define POLLERR 8 /* An error occured, not used by Cygwin. */ +#define POLLHUP 16 /* Shutdown or close happened. */ +#define POLLNVAL 32 /* Invalid file descriptor. */ + +#define NPOLLFILE 64 /* Number of canonical fd's in one call to poll(). */ + +/* The following values are defined by XPG4. */ +#define POLLRDNORM POLLIN +#define POLLRDBAND POLLPRI +#define POLLWRNORM POLLOUT +#define POLLWRBAND POLLOUT + +struct pollfd { + int fd; + short events; + short revents; +}; + +extern int poll __P ((struct pollfd *fds, unsigned int nfds, int timeout)); + +__END_DECLS + +#endif /* _SYS_POLL_H */ |