Add siggetmask/sigsetmask syscalls.
This commit is contained in:
parent
5932e6a6cd
commit
9a0f18cccc
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.50 2009/01/30 13:55:51 njoly Exp $
|
||||
$NetBSD: syscalls.master,v 1.51 2009/06/02 16:54:39 njoly Exp $
|
||||
|
||||
; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file.
|
||||
; (See syscalls.conf to see what it is processed into.)
|
||||
|
@ -144,8 +144,8 @@
|
|||
65 NOARGS { int|sys||getpgrp(void); }
|
||||
66 NOARGS { int|sys||setsid(void); }
|
||||
67 UNIMPL sigaction
|
||||
68 UNIMPL siggetmask
|
||||
69 UNIMPL sigsetmask
|
||||
68 STD { int|linux32_sys||siggetmask(void); }
|
||||
69 STD { int|linux32_sys||sigsetmask(linux32_old_sigset_t mask); }
|
||||
70 STD { int|linux32_sys||setreuid16(linux32_uid16_t ruid, \
|
||||
linux32_uid16_t euid); }
|
||||
71 STD { int|linux32_sys||setregid16(linux32_gid16_t rgid, \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux32_signal.c,v 1.11 2009/03/18 16:00:17 cegger Exp $ */
|
||||
/* $NetBSD: linux32_signal.c,v 1.12 2009/06/02 16:54:39 njoly Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.11 2009/03/18 16:00:17 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.12 2009/06/02 16:54:39 njoly Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/ucred.h>
|
||||
|
@ -407,3 +407,44 @@ linux32_sys_rt_sigpending(struct lwp *l, const struct linux32_sys_rt_sigpending_
|
|||
native_to_linux32_sigset(&lss, &bss);
|
||||
return copyout(&lss, SCARG_P32(uap, set), sizeof(lss));
|
||||
}
|
||||
|
||||
int
|
||||
linux32_sys_siggetmask(struct lwp *l, const void *v, register_t *retval)
|
||||
{
|
||||
struct proc *p = l->l_proc;
|
||||
sigset_t bss;
|
||||
linux32_old_sigset_t lss;
|
||||
int error;
|
||||
|
||||
mutex_enter(p->p_lock);
|
||||
error = sigprocmask1(l, SIG_SETMASK, 0, &bss);
|
||||
mutex_exit(p->p_lock);
|
||||
if (error)
|
||||
return error;
|
||||
native_to_linux32_old_sigset(&lss, &bss);
|
||||
*retval = lss;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
linux32_sys_sigsetmask(struct lwp *l, const struct linux32_sys_sigsetmask_args *uap, register_t *retval)
|
||||
{
|
||||
/* {
|
||||
syscallarg(linux32_old_sigset_t) mask;
|
||||
} */
|
||||
sigset_t nbss, obss;
|
||||
linux32_old_sigset_t nlss, olss;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
|
||||
nlss = SCARG(uap, mask);
|
||||
linux32_old_to_native_sigset(&nbss, &nlss);
|
||||
mutex_enter(p->p_lock);
|
||||
error = sigprocmask1(l, SIG_SETMASK, &nbss, &obss);
|
||||
mutex_exit(p->p_lock);
|
||||
if (error)
|
||||
return error;
|
||||
native_to_linux32_old_sigset(&olss, &obss);
|
||||
*retval = olss;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue