thr_sigmask.c (117300) | thr_sigmask.c (117706) |
---|---|
1/* 2 * Copyright (c) 1997 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) 1997 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_sigmask.c 117300 2003-07-07 04:28:23Z davidxu $ | 32 * $FreeBSD: head/lib/libkse/thread/thr_sigmask.c 117706 2003-07-17 23:02:30Z davidxu $ |
33 */ 34#include <sys/param.h> 35#include <sys/types.h> 36#include <sys/signalvar.h> 37#include <errno.h> 38#include <signal.h> 39#include <string.h> 40#include <pthread.h> --- 6 unchanged lines hidden (view full) --- 47{ 48 struct pthread *curthread = _get_curthread(); 49 sigset_t oldset, newset; 50 int ret; 51 52 if (! _kse_isthreaded()) 53 _kse_setthreaded(1); 54 | 33 */ 34#include <sys/param.h> 35#include <sys/types.h> 36#include <sys/signalvar.h> 37#include <errno.h> 38#include <signal.h> 39#include <string.h> 40#include <pthread.h> --- 6 unchanged lines hidden (view full) --- 47{ 48 struct pthread *curthread = _get_curthread(); 49 sigset_t oldset, newset; 50 int ret; 51 52 if (! _kse_isthreaded()) 53 _kse_setthreaded(1); 54 |
55 if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) { 56 ret = __sys_sigprocmask(how, set, oset); 57 if (ret != 0) 58 ret = errno; 59 /* Get a copy for thread dump */ 60 __sys_sigprocmask(SIG_SETMASK, NULL, &curthread->sigmask); 61 return (ret); 62 } 63 |
|
55 if (set) 56 newset = *set; 57 58 THR_SCHED_LOCK(curthread, curthread); 59 60 ret = 0; 61 if (oset != NULL) 62 /* Return the current mask: */ --- 46 unchanged lines hidden --- | 64 if (set) 65 newset = *set; 66 67 THR_SCHED_LOCK(curthread, curthread); 68 69 ret = 0; 70 if (oset != NULL) 71 /* Return the current mask: */ --- 46 unchanged lines hidden --- |