thr_sigaction.c (117300) | thr_sigaction.c (119063) |
---|---|
1/* 2 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> 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 --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> 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 --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/lib/libkse/thread/thr_sigaction.c 117300 2003-07-07 04:28:23Z davidxu $ | 32 * $FreeBSD: head/lib/libkse/thread/thr_sigaction.c 119063 2003-08-18 03:58:29Z davidxu $ |
33 */ 34#include <signal.h> 35#include <errno.h> 36#include <pthread.h> 37#include "thr_private.h" 38 39__weak_reference(_sigaction, sigaction); 40 --- 6 unchanged lines hidden (view full) --- 47 kse_critical_t crit; 48 49 /* Check if the signal number is out of range: */ 50 if (sig < 1 || sig > _SIG_MAXSIG) { 51 /* Return an invalid argument: */ 52 errno = EINVAL; 53 ret = -1; 54 } else { | 33 */ 34#include <signal.h> 35#include <errno.h> 36#include <pthread.h> 37#include "thr_private.h" 38 39__weak_reference(_sigaction, sigaction); 40 --- 6 unchanged lines hidden (view full) --- 47 kse_critical_t crit; 48 49 /* Check if the signal number is out of range: */ 50 if (sig < 1 || sig > _SIG_MAXSIG) { 51 /* Return an invalid argument: */ 52 errno = EINVAL; 53 ret = -1; 54 } else { |
55 if (!_kse_isthreaded()) 56 return __sys_sigaction(sig, act, oact); 57 | |
58 if (act) 59 newact = *act; 60 61 crit = _kse_critical_enter(); 62 curthread = _get_curthread(); 63 KSE_LOCK_ACQUIRE(curthread->kse, &_thread_signal_lock); 64 /* 65 * Check if the existing signal action structure contents are --- 47 unchanged lines hidden --- | 55 if (act) 56 newact = *act; 57 58 crit = _kse_critical_enter(); 59 curthread = _get_curthread(); 60 KSE_LOCK_ACQUIRE(curthread->kse, &_thread_signal_lock); 61 /* 62 * Check if the existing signal action structure contents are --- 47 unchanged lines hidden --- |