POSIX: introduce ppoll
will appear in the next version: https://www.opengroup.org/austin/docs/austin_1110.pdf Change-Id: I38014ad910881df260f0ec762831491e143328c4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4099 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
+15
-3
@@ -6,6 +6,10 @@
|
||||
#define _POLL_H
|
||||
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
||||
typedef unsigned long nfds_t;
|
||||
|
||||
struct pollfd {
|
||||
@@ -29,10 +33,18 @@ struct pollfd {
|
||||
#define POLLNVAL 0x1000 /* invalid file descriptor */
|
||||
|
||||
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
extern "C" {
|
||||
#endif
|
||||
int poll(struct pollfd *fds, nfds_t numfds, int timeout);
|
||||
|
||||
extern int poll(struct pollfd *fds, nfds_t numfds, int timeout);
|
||||
extern int ppoll(struct pollfd *fds, nfds_t numfds,
|
||||
const struct timespec *timeout, const sigset_t *sigMask);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif /* _POLL_H */
|
||||
|
||||
@@ -211,7 +211,8 @@ status_t _user_access(int fd, const char *path, int mode,
|
||||
bool effectiveUserGroup);
|
||||
ssize_t _user_select(int numfds, fd_set *readSet, fd_set *writeSet,
|
||||
fd_set *errorSet, bigtime_t timeout, const sigset_t *sigMask);
|
||||
ssize_t _user_poll(struct pollfd *fds, int numfds, bigtime_t timeout);
|
||||
ssize_t _user_poll(struct pollfd *fds, int numfds, bigtime_t timeout,
|
||||
const sigset_t *sigMask);
|
||||
int _user_open_attr_dir(int fd, const char *path,
|
||||
bool traverseLeafLink);
|
||||
ssize_t _user_read_attr(int fd, const char *attribute, off_t pos,
|
||||
|
||||
@@ -286,7 +286,7 @@ extern ssize_t _kern_select(int numfds, struct fd_set *readSet,
|
||||
struct fd_set *writeSet, struct fd_set *errorSet,
|
||||
bigtime_t timeout, const sigset_t *sigMask);
|
||||
extern ssize_t _kern_poll(struct pollfd *fds, int numFDs,
|
||||
bigtime_t timeout);
|
||||
bigtime_t timeout, const sigset_t *sigMask);
|
||||
|
||||
extern int _kern_open_attr_dir(int fd, const char *path,
|
||||
bool traverseLeafLink);
|
||||
|
||||
Reference in New Issue
Block a user