diff options
author | dchagin <dchagin@FreeBSD.org> | 2014-12-21 07:58:28 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2014-12-21 07:58:28 +0000 |
commit | dfe2ad4d4623524826fd780517aa15fdc759a1da (patch) | |
tree | 7345c217602377f5b4227533feef3ce74e57a719 /sys/compat/freebsd32 | |
parent | f73f068967977545d4d60b36864475974dca2613 (diff) | |
download | FreeBSD-src-dfe2ad4d4623524826fd780517aa15fdc759a1da.zip FreeBSD-src-dfe2ad4d4623524826fd780517aa15fdc759a1da.tar.gz |
MFC r274462: Add the ppoll() system call.
Diffstat (limited to 'sys/compat/freebsd32')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 28 | ||||
-rw-r--r-- | sys/compat/freebsd32/syscalls.master | 3 |
2 files changed, 31 insertions, 0 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index eeb8347..2061100 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3102,3 +3102,31 @@ freebsd32_fcntl(struct thread *td, struct freebsd32_fcntl_args *uap) } return (kern_fcntl_freebsd(td, uap->fd, uap->cmd, tmp)); } + +int +freebsd32_ppoll(struct thread *td, struct freebsd32_ppoll_args *uap) +{ + struct timespec32 ts32; + struct timespec ts, *tsp; + sigset_t set, *ssp; + int error; + + if (uap->ts != NULL) { + error = copyin(uap->ts, &ts32, sizeof(ts32)); + if (error != 0) + return (error); + CP(ts32, ts, tv_sec); + CP(ts32, ts, tv_nsec); + tsp = &ts; + } else + tsp = NULL; + if (uap->set != NULL) { + error = copyin(uap->set, &set, sizeof(set)); + if (error != 0) + return (error); + ssp = &set; + } else + ssp = NULL; + + return (kern_poll(td, uap->fds, uap->nfds, tsp, ssp)); +} diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index f14fb76..ed3cc29 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -1066,3 +1066,6 @@ uint32_t id1, uint32_t id2, int com, \ void *data); } #endif +545 AUE_POLL STD { int freebsd32_ppoll(struct pollfd *fds, \ + u_int nfds, const struct timespec32 *ts, \ + const sigset_t *set); } |