Deleted Added
full compact
thr_sigmask.c (117706) thr_sigmask.c (119063)
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 117706 2003-07-17 23:02:30Z davidxu $
32 * $FreeBSD: head/lib/libkse/thread/thr_sigmask.c 119063 2003-08-18 03:58:29Z 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>
41#include "thr_private.h"
42
43__weak_reference(_pthread_sigmask, pthread_sigmask);
44
45int
46_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
47{
48 struct pthread *curthread = _get_curthread();
49 sigset_t oldset, newset;
50 int ret;
51
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>
41#include "thr_private.h"
42
43__weak_reference(_pthread_sigmask, pthread_sigmask);
44
45int
46_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
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 }

--- 55 unchanged lines hidden ---
52 if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) {
53 ret = __sys_sigprocmask(how, set, oset);
54 if (ret != 0)
55 ret = errno;
56 /* Get a copy for thread dump */
57 __sys_sigprocmask(SIG_SETMASK, NULL, &curthread->sigmask);
58 return (ret);
59 }

--- 55 unchanged lines hidden ---