Deleted Added
full compact
kern_thread.c (119488) kern_thread.c (122514)
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 119488 2003-08-26 11:33:15Z davidxu $");
30__FBSDID("$FreeBSD: head/sys/kern/kern_thread.c 122514 2003-11-11 22:07:29Z jhb $");
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/lock.h>
36#include <sys/malloc.h>
37#include <sys/mutex.h>
38#include <sys/proc.h>
39#include <sys/smp.h>
40#include <sys/sysctl.h>
41#include <sys/sysproto.h>
42#include <sys/filedesc.h>
43#include <sys/sched.h>
44#include <sys/signalvar.h>
45#include <sys/sx.h>
46#include <sys/tty.h>
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/lock.h>
36#include <sys/malloc.h>
37#include <sys/mutex.h>
38#include <sys/proc.h>
39#include <sys/smp.h>
40#include <sys/sysctl.h>
41#include <sys/sysproto.h>
42#include <sys/filedesc.h>
43#include <sys/sched.h>
44#include <sys/signalvar.h>
45#include <sys/sx.h>
46#include <sys/tty.h>
47#include <sys/turnstile.h>
47#include <sys/user.h>
48#include <sys/jail.h>
49#include <sys/kse.h>
50#include <sys/ktr.h>
51#include <sys/ucontext.h>
52
53#include <vm/vm.h>
54#include <vm/vm_extern.h>

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

185{
186 struct thread *td;
187
188 td = (struct thread *)mem;
189 mtx_lock(&Giant);
190 vm_thread_new(td, 0);
191 mtx_unlock(&Giant);
192 cpu_thread_setup(td);
48#include <sys/user.h>
49#include <sys/jail.h>
50#include <sys/kse.h>
51#include <sys/ktr.h>
52#include <sys/ucontext.h>
53
54#include <vm/vm.h>
55#include <vm/vm_extern.h>

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

186{
187 struct thread *td;
188
189 td = (struct thread *)mem;
190 mtx_lock(&Giant);
191 vm_thread_new(td, 0);
192 mtx_unlock(&Giant);
193 cpu_thread_setup(td);
194 td->td_turnstile = turnstile_alloc();
193 td->td_sched = (struct td_sched *)&td[1];
194}
195
196/*
197 * Tear down type-stable parts of a thread (just before being discarded).
198 */
199static void
200thread_fini(void *mem, int size)
201{
202 struct thread *td;
203
204 td = (struct thread *)mem;
195 td->td_sched = (struct td_sched *)&td[1];
196}
197
198/*
199 * Tear down type-stable parts of a thread (just before being discarded).
200 */
201static void
202thread_fini(void *mem, int size)
203{
204 struct thread *td;
205
206 td = (struct thread *)mem;
207 turnstile_free(td->td_turnstile);
205 vm_thread_dispose(td);
206}
207
208/*
209 * Initialize type-stable parts of a kse (when newly created).
210 */
211static void
212kse_init(void *mem, int size)

--- 1903 unchanged lines hidden ---
208 vm_thread_dispose(td);
209}
210
211/*
212 * Initialize type-stable parts of a kse (when newly created).
213 */
214static void
215kse_init(void *mem, int size)

--- 1903 unchanged lines hidden ---