emulate ppoll which is essentially our pollts
This commit is contained in:
parent
f5f7a747ec
commit
c44c9c4953
@ -1,4 +1,4 @@
|
||||
$NetBSD: syscalls.master,v 1.76 2011/11/18 04:03:50 christos Exp $
|
||||
$NetBSD: syscalls.master,v 1.77 2012/09/19 21:19:14 pooka Exp $
|
||||
;
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
@ -712,7 +712,9 @@
|
||||
461 UNIMPL fchmodat
|
||||
462 UNIMPL faccessat
|
||||
463 UNIMPL pselect6
|
||||
464 UNIMPL ppoll
|
||||
464 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
|
||||
struct linux_timespec *timeout, \
|
||||
linux_sigset_t *sigset); }
|
||||
465 UNIMPL unshare
|
||||
466 STD { int|linux_sys||set_robust_list( \
|
||||
struct linux_robust_list_head *head, size_t len); }
|
||||
|
@ -1,4 +1,4 @@
|
||||
$NetBSD: syscalls.master,v 1.40 2011/11/18 04:03:50 christos Exp $
|
||||
$NetBSD: syscalls.master,v 1.41 2012/09/19 21:19:14 pooka Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
@ -476,7 +476,9 @@
|
||||
268 UNIMPL fchmodat
|
||||
269 UNIMPL faccessat
|
||||
270 UNIMPL pselect6
|
||||
271 UNIMPL ppoll
|
||||
271 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
|
||||
struct linux_timespec *timeout, \
|
||||
linux_sigset_t *sigset); }
|
||||
272 UNIMPL unshare
|
||||
273 STD { int|linux_sys||set_robust_list( \
|
||||
struct linux_robust_list_head *head, size_t len); }
|
||||
|
@ -1,4 +1,4 @@
|
||||
$NetBSD: syscalls.master,v 1.48 2011/11/18 04:03:50 christos Exp $
|
||||
$NetBSD: syscalls.master,v 1.49 2012/09/19 21:19:14 pooka Exp $
|
||||
|
||||
; Derived from sys/compat/linux/arch/*/syscalls.master
|
||||
; and from Linux 2.4.12 arch/arm/kernel/calls.S
|
||||
@ -517,7 +517,9 @@
|
||||
333 UNIMPL fchmodat
|
||||
334 UNIMPL faccessat
|
||||
335 UNIMPL pselect6
|
||||
336 UNIMPL ppoll
|
||||
336 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
|
||||
struct linux_timespec *timeout, \
|
||||
linux_sigset_t *sigset); }
|
||||
337 UNIMPL unshare
|
||||
338 STD { int|linux_sys||set_robust_list( \
|
||||
struct linux_robust_list_head *head, size_t len); }
|
||||
|
@ -1,4 +1,4 @@
|
||||
$NetBSD: syscalls.master,v 1.107 2011/11/18 04:03:50 christos Exp $
|
||||
$NetBSD: syscalls.master,v 1.108 2012/09/19 21:19:14 pooka Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
@ -490,7 +490,9 @@
|
||||
306 UNIMPL fchmodat
|
||||
307 UNIMPL faccessat
|
||||
308 UNIMPL pselect6
|
||||
309 UNIMPL ppoll
|
||||
309 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
|
||||
struct linux_timespec *timeout, \
|
||||
linux_sigset_t *sigset); }
|
||||
310 UNIMPL unshare
|
||||
311 STD { int|linux_sys||set_robust_list( \
|
||||
struct linux_robust_list_head *head, size_t len); }
|
||||
|
@ -1,4 +1,4 @@
|
||||
$NetBSD: syscalls.master,v 1.73 2011/11/18 04:03:50 christos Exp $
|
||||
$NetBSD: syscalls.master,v 1.74 2012/09/19 21:19:14 pooka Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
@ -498,7 +498,9 @@
|
||||
299 UNIMPL fchmodat
|
||||
300 UNIMPL faccessat
|
||||
301 UNIMPL pselect6
|
||||
302 UNIMPL ppoll
|
||||
302 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
|
||||
struct linux_timespec *timeout, \
|
||||
linux_sigset_t *sigset); }
|
||||
303 UNIMPL unshare
|
||||
304 STD { int|linux_sys||set_robust_list( \
|
||||
struct linux_robust_list_head *head, size_t len); }
|
||||
|
@ -1,4 +1,4 @@
|
||||
$NetBSD: syscalls.master,v 1.43 2011/11/18 04:03:51 christos Exp $
|
||||
$NetBSD: syscalls.master,v 1.44 2012/09/19 21:19:15 pooka Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
@ -487,7 +487,9 @@
|
||||
299 UNIMPL fchmodat
|
||||
300 UNIMPL faccessat
|
||||
301 UNIMPL pselect6
|
||||
302 UNIMPL ppoll
|
||||
302 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
|
||||
struct linux_timespec *timeout, \
|
||||
linux_sigset_t *sigset); }
|
||||
303 UNIMPL unshare
|
||||
304 UNIMPL splice
|
||||
305 UNIMPL sync_file_range
|
||||
|
@ -1,4 +1,4 @@
|
||||
$NetBSD: syscalls.master,v 1.50 2011/11/18 04:03:51 christos Exp $
|
||||
$NetBSD: syscalls.master,v 1.51 2012/09/19 21:19:15 pooka Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
@ -476,7 +476,9 @@
|
||||
278 UNIMPL spu_run
|
||||
279 UNIMPL spu_create
|
||||
280 UNIMPL pselect6
|
||||
281 UNIMPL ppoll
|
||||
281 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
|
||||
struct linux_timespec *timeout, \
|
||||
linux_sigset_t *sigset); }
|
||||
282 UNIMPL unshare
|
||||
283 UNIMPL splice
|
||||
284 UNIMPL tee
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_misc.c,v 1.219 2011/10/14 09:23:28 hannken Exp $ */
|
||||
/* $NetBSD: linux_misc.c,v 1.220 2012/09/19 21:19:15 pooka Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
|
||||
@ -57,7 +57,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.219 2011/10/14 09:23:28 hannken Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.220 2012/09/19 21:19:15 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -73,6 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.219 2011/10/14 09:23:28 hannken Exp
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/prot.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/resource.h>
|
||||
@ -119,6 +120,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.219 2011/10/14 09:23:28 hannken Exp
|
||||
#include <compat/linux/common/linux_ptrace.h>
|
||||
#include <compat/linux/common/linux_reboot.h>
|
||||
#include <compat/linux/common/linux_emuldata.h>
|
||||
#include <compat/linux/common/linux_sched.h>
|
||||
|
||||
#include <compat/linux/linux_syscallargs.h>
|
||||
|
||||
@ -920,6 +922,42 @@ linux_select1(struct lwp *l, register_t *retval, int nfds, fd_set *readfds,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
linux_sys_ppoll(struct lwp *l,
|
||||
const struct linux_sys_ppoll_args *uap, register_t *retval)
|
||||
{
|
||||
/* {
|
||||
syscallarg(struct pollfd *) fds;
|
||||
syscallarg(int) nfds;
|
||||
syscallarg(struct linux_timespec *) timeout;
|
||||
syscallarg(linux_sigset_t *) sigset;
|
||||
} */
|
||||
struct linux_timespec lts0, *lts;
|
||||
struct timespec ts0, *ts = NULL;
|
||||
linux_sigset_t lsigmask0, *lsigmask;
|
||||
sigset_t sigmask0, *sigmask = NULL;
|
||||
int error;
|
||||
|
||||
lts = SCARG(uap, timeout);
|
||||
if (lts) {
|
||||
if ((error = copyin(lts, <s0, sizeof(lts0))) != 0)
|
||||
return error;
|
||||
linux_to_native_timespec(&ts0, <s0);
|
||||
ts = &ts0;
|
||||
}
|
||||
|
||||
lsigmask = SCARG(uap, sigset);
|
||||
if (lsigmask) {
|
||||
if ((error = copyin(lsigmask, &lsigmask0, sizeof(lsigmask0))))
|
||||
return error;
|
||||
linux_to_native_sigset(&sigmask0, &lsigmask0);
|
||||
sigmask = &sigmask0;
|
||||
}
|
||||
|
||||
return pollcommon(retval, SCARG(uap, fds), SCARG(uap, nfds),
|
||||
ts, sigmask);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the 'personality' (emulation mode) for the current process. Only
|
||||
* accept the Linux personality here (0). This call is needed because
|
||||
|
Loading…
Reference in New Issue
Block a user