svr4_signal.c (112888) | svr4_signal.c (113613) |
---|---|
1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1994 Christos Zoulas 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 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) 1998 Mark Newton 3 * Copyright (c) 1994 Christos Zoulas 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 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 * $FreeBSD: head/sys/compat/svr4/svr4_signal.c 112888 2003-03-31 22:49:17Z jeff $ | 28 * $FreeBSD: head/sys/compat/svr4/svr4_signal.c 113613 2003-04-17 22:02:47Z jhb $ |
29 */ 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/filedesc.h> 34#include <sys/lock.h> 35#include <sys/mutex.h> 36#include <sys/proc.h> --- 512 unchanged lines hidden (view full) --- 549 return error; 550} 551 552int 553svr4_sys_sigpending(td, uap) 554 struct thread *td; 555 struct svr4_sys_sigpending_args *uap; 556{ | 29 */ 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/filedesc.h> 34#include <sys/lock.h> 35#include <sys/mutex.h> 36#include <sys/proc.h> --- 512 unchanged lines hidden (view full) --- 549 return error; 550} 551 552int 553svr4_sys_sigpending(td, uap) 554 struct thread *td; 555 struct svr4_sys_sigpending_args *uap; 556{ |
557 struct proc *p; |
|
557 sigset_t bss; | 558 sigset_t bss; |
558 int *retval; | |
559 svr4_sigset_t sss; 560 | 559 svr4_sigset_t sss; 560 |
561 DPRINTF(("@@@ svr4_sys_sigpending(%d)\n", td->td_proc->p_pid)); 562 retval = td->td_retval; | 561 p = td->td_proc; 562 DPRINTF(("@@@ svr4_sys_sigpending(%d)\n", p->p_pid)); |
563 switch (uap->what) { 564 case 1: /* sigpending */ 565 if (uap->mask == NULL) 566 return 0; | 563 switch (uap->what) { 564 case 1: /* sigpending */ 565 if (uap->mask == NULL) 566 return 0; |
567 PROC_LOCK(td->td_proc); 568 bss = td->td_proc->p_siglist; | 567 PROC_LOCK(p); 568 bss = p->p_siglist; |
569 SIGSETOR(bss, td->td_siglist); 570 SIGSETAND(bss, td->td_sigmask); | 569 SIGSETOR(bss, td->td_siglist); 570 SIGSETAND(bss, td->td_sigmask); |
571 PROC_UNLOCK(td->td_proc); | 571 PROC_UNLOCK(p); |
572 bsd_to_svr4_sigset(&bss, &sss); 573 break; 574 575 case 2: /* sigfillset */ 576 svr4_sigfillset(&sss); 577#if defined(DEBUG_SVR4) 578 { 579 int i; --- 98 unchanged lines hidden --- | 572 bsd_to_svr4_sigset(&bss, &sss); 573 break; 574 575 case 2: /* sigfillset */ 576 svr4_sigfillset(&sss); 577#if defined(DEBUG_SVR4) 578 { 579 int i; --- 98 unchanged lines hidden --- |