Deleted Added
full compact
thr_sigprocmask.c (50476) thr_sigprocmask.c (51794)
1/*
2 * Copyright (c) 1995 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 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_sigprocmask.c 50476 1999-08-28 00:22:10Z peter $
32 * $FreeBSD: head/lib/libkse/thread/thr_sigprocmask.c 51794 1999-09-29 15:18:46Z marcel $
33 */
33 */
34#include <sys/param.h>
35#include <sys/types.h>
36#include <sys/signalvar.h>
34#include <signal.h>
35#include <errno.h>
36#ifdef _THREAD_SAFE
37#include <pthread.h>
38#include "pthread_private.h"
39
40int
41sigprocmask(int how, const sigset_t * set, sigset_t * oset)

--- 7 unchanged lines hidden (view full) ---

49 }
50 /* Check if a new signal set was provided by the caller: */
51 if (set != NULL) {
52 /* Process according to what to do: */
53 switch (how) {
54 /* Block signals: */
55 case SIG_BLOCK:
56 /* Add signals to the existing mask: */
37#include <signal.h>
38#include <errno.h>
39#ifdef _THREAD_SAFE
40#include <pthread.h>
41#include "pthread_private.h"
42
43int
44sigprocmask(int how, const sigset_t * set, sigset_t * oset)

--- 7 unchanged lines hidden (view full) ---

52 }
53 /* Check if a new signal set was provided by the caller: */
54 if (set != NULL) {
55 /* Process according to what to do: */
56 switch (how) {
57 /* Block signals: */
58 case SIG_BLOCK:
59 /* Add signals to the existing mask: */
57 _thread_run->sigmask |= *set;
60 SIGSETOR(_thread_run->sigmask, *set);
58 break;
59
60 /* Unblock signals: */
61 case SIG_UNBLOCK:
62 /* Clear signals from the existing mask: */
61 break;
62
63 /* Unblock signals: */
64 case SIG_UNBLOCK:
65 /* Clear signals from the existing mask: */
63 _thread_run->sigmask &= ~(*set);
66 SIGSETNAND(_thread_run->sigmask, *set);
64 break;
65
66 /* Set the signal process mask: */
67 case SIG_SETMASK:
68 /* Set the new mask: */
69 _thread_run->sigmask = *set;
70 break;
71

--- 18 unchanged lines hidden ---
67 break;
68
69 /* Set the signal process mask: */
70 case SIG_SETMASK:
71 /* Set the new mask: */
72 _thread_run->sigmask = *set;
73 break;
74

--- 18 unchanged lines hidden ---