Deleted Added
full compact
kern_thread.c (133234) kern_thread.c (133396)
1/*
2 * Copyright (C) 2001 Julian Elischer <julian@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

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

22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26 * DAMAGE.
27 */
28
29#include <sys/cdefs.h>
1/*
2 * Copyright (C) 2001 Julian Elischer <julian@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

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

22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26 * DAMAGE.
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/kern/kern_thread.c 133234 2004-08-06 22:06:14Z rwatson $");
30__FBSDID("$FreeBSD: head/sys/kern/kern_thread.c 133396 2004-08-09 18:21:12Z julian $");
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/lock.h>
36#include <sys/mutex.h>
37#include <sys/proc.h>
38#include <sys/smp.h>

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

677 td->td_proc = NULL;
678#endif
679 td->td_ksegrp = NULL;
680 td->td_last_kse = NULL;
681 PCPU_SET(deadthread, td);
682 } else {
683 PROC_UNLOCK(p);
684 }
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/lock.h>
36#include <sys/mutex.h>
37#include <sys/proc.h>
38#include <sys/smp.h>

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

677 td->td_proc = NULL;
678#endif
679 td->td_ksegrp = NULL;
680 td->td_last_kse = NULL;
681 PCPU_SET(deadthread, td);
682 } else {
683 PROC_UNLOCK(p);
684 }
685 td->td_state = TDS_INACTIVE;
686 /* XXX Shouldn't cpu_throw() here. */
687 mtx_assert(&sched_lock, MA_OWNED);
685 td->td_state = TDS_INACTIVE;
686 CTR1(KTR_PROC, "thread_exit: cpu_throw() thread %p", td);
688 cpu_throw(td, choosethread());
689 panic("I'm a teapot!");
690 /* NOTREACHED */
691}
692
693/*
694 * Do any thread specific cleanups that may be needed in wait()
695 * called with Giant, proc and schedlock not held.

--- 418 unchanged lines hidden ---
687 cpu_throw(td, choosethread());
688 panic("I'm a teapot!");
689 /* NOTREACHED */
690}
691
692/*
693 * Do any thread specific cleanups that may be needed in wait()
694 * called with Giant, proc and schedlock not held.

--- 418 unchanged lines hidden ---