Deleted Added
full compact
thr_sigwait.c (113658) thr_sigwait.c (114187)
1//depot/projects/kse/lib/libpthread/thread/thr_sigwait.c#1 - branch change 15154 (text+ko)
2/*
3 * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
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:

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

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1//depot/projects/kse/lib/libpthread/thread/thr_sigwait.c#1 - branch change 15154 (text+ko)
2/*
3 * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
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:

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

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $FreeBSD: head/lib/libkse/thread/thr_sigwait.c 113658 2003-04-18 05:04:16Z deischen $
33 * $FreeBSD: head/lib/libkse/thread/thr_sigwait.c 114187 2003-04-28 23:56:12Z deischen $
34 */
35#include <signal.h>
36#include <sys/param.h>
37#include <sys/signalvar.h>
38#include <errno.h>
39#include <pthread.h>
40#include "thr_private.h"
41

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

129 /*
130 * Save the wait signal mask. The wait signal
131 * mask is independent of the threads signal mask
132 * and requires separate storage.
133 */
134 curthread->data.sigwait = &waitset;
135
136 /* Wait for a signal: */
34 */
35#include <signal.h>
36#include <sys/param.h>
37#include <sys/signalvar.h>
38#include <errno.h>
39#include <pthread.h>
40#include "thr_private.h"
41

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

129 /*
130 * Save the wait signal mask. The wait signal
131 * mask is independent of the threads signal mask
132 * and requires separate storage.
133 */
134 curthread->data.sigwait = &waitset;
135
136 /* Wait for a signal: */
137 THR_SCHED_LOCK(curthread, curthread);
137 THR_LOCK_SWITCH(curthread);
138 THR_SET_STATE(curthread, PS_SIGWAIT);
138 THR_SET_STATE(curthread, PS_SIGWAIT);
139 THR_SCHED_UNLOCK(curthread, curthread);
140 _thr_sched_switch(curthread);
139 _thr_sched_switch(curthread);
141
140 THR_UNLOCK_SWITCH(curthread);
142 /* Return the signal number to the caller: */
143 *sig = curthread->signo;
144
145 /*
146 * Probably unnecessary, but since it's in a union struct
147 * we don't know how it could be used in the future.
148 */
149 curthread->data.sigwait = NULL;

--- 27 unchanged lines hidden ---
141 /* Return the signal number to the caller: */
142 *sig = curthread->signo;
143
144 /*
145 * Probably unnecessary, but since it's in a union struct
146 * we don't know how it could be used in the future.
147 */
148 curthread->data.sigwait = NULL;

--- 27 unchanged lines hidden ---