Deleted Added
full compact
kern_thread.c (173631) kern_thread.c (174629)
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 173631 2007-11-15 14:20:07Z rrs $");
30__FBSDID("$FreeBSD: head/sys/kern/kern_thread.c 174629 2007-12-15 23:13:31Z jeff $");
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/resourcevar.h>

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

550 * it's spinlock has been created.
551 * PROC_SLOCK_ASSERT(p, MA_OWNED);
552 */
553 td->td_state = TDS_INACTIVE;
554 td->td_proc = p;
555 td->td_flags = TDF_INMEM;
556
557 LIST_INIT(&td->td_contested);
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/resourcevar.h>

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

550 * it's spinlock has been created.
551 * PROC_SLOCK_ASSERT(p, MA_OWNED);
552 */
553 td->td_state = TDS_INACTIVE;
554 td->td_proc = p;
555 td->td_flags = TDF_INMEM;
556
557 LIST_INIT(&td->td_contested);
558 LIST_INIT(&td->td_lprof[0]);
559 LIST_INIT(&td->td_lprof[1]);
558 sigqueue_init(&td->td_sigqueue, p);
559 callout_init(&td->td_slpcallout, CALLOUT_MPSAFE);
560 TAILQ_INSERT_HEAD(&p->p_threads, td, td_plist);
561 p->p_numthreads++;
562}
563
564/*
565 * Convert a process with one thread to an unthreaded process.

--- 419 unchanged lines hidden ---
560 sigqueue_init(&td->td_sigqueue, p);
561 callout_init(&td->td_slpcallout, CALLOUT_MPSAFE);
562 TAILQ_INSERT_HEAD(&p->p_threads, td, td_plist);
563 p->p_numthreads++;
564}
565
566/*
567 * Convert a process with one thread to an unthreaded process.

--- 419 unchanged lines hidden ---