linux_signal.c (14342) | linux_signal.c (14381) |
---|---|
1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $Id: linux_signal.c,v 1.4 1996/03/02 19:37:58 peter Exp $ | 28 * $Id: linux_signal.c,v 1.5 1996/03/02 21:00:11 peter Exp $ |
29 */ 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/sysproto.h> 34#include <sys/proc.h> 35#include <sys/exec.h> 36#include <sys/signal.h> --- 225 unchanged lines hidden (view full) --- 262 263#ifdef DEBUG 264 printf("Linux-emul(%d): sigpending(*)\n", p->p_pid); 265#endif 266 linux_sig = bsd_to_linux_sigset(p->p_siglist & p->p_sigmask); 267 return copyout(&linux_sig, args->mask, sizeof(linux_sig)); 268} 269 | 29 */ 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/sysproto.h> 34#include <sys/proc.h> 35#include <sys/exec.h> 36#include <sys/signal.h> --- 225 unchanged lines hidden (view full) --- 262 263#ifdef DEBUG 264 printf("Linux-emul(%d): sigpending(*)\n", p->p_pid); 265#endif 266 linux_sig = bsd_to_linux_sigset(p->p_siglist & p->p_sigmask); 267 return copyout(&linux_sig, args->mask, sizeof(linux_sig)); 268} 269 |
270/* 271 * Linux has two extra args, restart and oldmask. We dont use these, 272 * but it seems that "restart" is actually a context pointer that 273 * enables the signal to happen with a different register set. 274 */ |
|
270int 271linux_sigsuspend(struct proc *p, struct linux_sigsuspend_args *args,int *retval) 272{ 273 struct sigsuspend_args tmp; | 275int 276linux_sigsuspend(struct proc *p, struct linux_sigsuspend_args *args,int *retval) 277{ 278 struct sigsuspend_args tmp; |
274 int error; | |
275 276#ifdef DEBUG 277 printf("Linux-emul(%d): sigsuspend(%08x)\n", p->p_pid, args->mask); 278#endif 279 tmp.mask = linux_to_bsd_sigset(args->mask); 280 return sigsuspend(p, &tmp , retval); 281} 282 283int 284linux_pause(struct proc *p, struct linux_pause_args *args,int *retval) 285{ 286 struct sigsuspend_args tmp; | 279 280#ifdef DEBUG 281 printf("Linux-emul(%d): sigsuspend(%08x)\n", p->p_pid, args->mask); 282#endif 283 tmp.mask = linux_to_bsd_sigset(args->mask); 284 return sigsuspend(p, &tmp , retval); 285} 286 287int 288linux_pause(struct proc *p, struct linux_pause_args *args,int *retval) 289{ 290 struct sigsuspend_args tmp; |
287 int error; | |
288 289#ifdef DEBUG 290 printf("Linux-emul(%d): pause()\n", p->p_pid); 291#endif 292 tmp.mask = p->p_sigmask; 293 return sigsuspend(p, &tmp , retval); 294} 295 --- 16 unchanged lines hidden --- | 291 292#ifdef DEBUG 293 printf("Linux-emul(%d): pause()\n", p->p_pid); 294#endif 295 tmp.mask = p->p_sigmask; 296 return sigsuspend(p, &tmp , retval); 297} 298 --- 16 unchanged lines hidden --- |