Deleted Added
full compact
thr_sig.c (164583) thr_sig.c (164877)
1/*
2 * Copyright (c) 2005, David Xu <davidxu@freebsd.org>
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

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

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*
2 * Copyright (c) 2005, David Xu <davidxu@freebsd.org>
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

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

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/lib/libthr/thread/thr_sig.c 164583 2006-11-24 09:57:38Z davidxu $
26 * $FreeBSD: head/lib/libthr/thread/thr_sig.c 164877 2006-12-04 14:20:41Z davidxu $
27 */
28
29#include "namespace.h"
30#include <sys/param.h>
31#include <sys/types.h>
32#include <sys/signalvar.h>
33#include <signal.h>
34#include <errno.h>

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

56int __sigwait(const sigset_t *set, int *sig);
57
58static void
59sigcancel_handler(int sig __unused,
60 siginfo_t *info __unused, ucontext_t *ucp __unused)
61{
62 struct pthread *curthread = _get_curthread();
63
27 */
28
29#include "namespace.h"
30#include <sys/param.h>
31#include <sys/types.h>
32#include <sys/signalvar.h>
33#include <signal.h>
34#include <errno.h>

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

56int __sigwait(const sigset_t *set, int *sig);
57
58static void
59sigcancel_handler(int sig __unused,
60 siginfo_t *info __unused, ucontext_t *ucp __unused)
61{
62 struct pthread *curthread = _get_curthread();
63
64 if (curthread->cancel_defer)
65 thr_wake(curthread->tid);
64 _thr_ast(curthread);
65}
66
67void
68_thr_ast(struct pthread *curthread)
69{
70 if (!THR_IN_CRITICAL(curthread)) {
71 _thr_testcancel(curthread);

--- 312 unchanged lines hidden ---
66 _thr_ast(curthread);
67}
68
69void
70_thr_ast(struct pthread *curthread)
71{
72 if (!THR_IN_CRITICAL(curthread)) {
73 _thr_testcancel(curthread);

--- 312 unchanged lines hidden ---