Deleted Added
full compact
42c42
< * $FreeBSD: head/sys/kern/init_main.c 79224 2001-07-04 16:20:28Z dillon $
---
> * $FreeBSD: head/sys/kern/init_main.c 83366 2001-09-12 08:38:13Z julian $
85a86
> struct thread *thread0;
93d93
< extern struct user *proc0paddr;
275a276
> struct thread *td;
278c279,283
<
---
> /*
> * This assumes the proc0 struct has already been linked
> * using proc_linkup() in the machine specific initialisation
> * e.g. i386_init()
> */
279a285,286
> td = thread0;
> mtx_init(&p->p_mtx, "process lock", MTX_DEF);
324,328c331,335
< p->p_nice = NZERO;
< p->p_pri.pri_class = PRI_TIMESHARE;
< p->p_pri.pri_level = PVM;
< p->p_pri.pri_native = PUSER;
< p->p_pri.pri_user = PUSER;
---
> p->p_ksegrp.kg_nice = NZERO;
> p->p_ksegrp.kg_pri.pri_class = PRI_TIMESHARE;
> p->p_ksegrp.kg_pri.pri_level = PVM;
> p->p_ksegrp.kg_pri.pri_native = PUSER;
> p->p_ksegrp.kg_pri.pri_user = PUSER;
336c343
< callout_init(&p->p_slpcallout, 1);
---
> callout_init(&td->td_slpcallout, 1);
384d390
< p->p_addr = proc0paddr; /* XXX */
390,391c396,397
< p->p_stats = &p->p_addr->u_stats;
< p->p_sigacts = &p->p_addr->u_sigacts;
---
> p->p_stats = &p->p_uarea->u_stats;
> p->p_sigacts = &p->p_uarea->u_sigacts;
469a476
> struct thread *td;
476c483,484
< p = curproc;
---
> td = curthread;
> p = td->td_proc;
485c493
< VOP_UNLOCK(rootvnode, 0, p);
---
> VOP_UNLOCK(rootvnode, 0, td);
576c584
< if ((error = execve(p, &args)) == 0) {
---
> if ((error = execve(td, &args)) == 0) {
600c608
< error = fork1(&proc0, RFFDG | RFPROC | RFSTOPPED, &initproc);
---
> error = fork1(thread0, RFFDG | RFPROC | RFSTOPPED, &initproc);
609c617
< cpu_set_fork_handler(initproc, start_init, NULL);
---
> cpu_set_fork_handler(&initproc->p_thread, start_init, NULL);
622c630
< setrunqueue(initproc);
---
> setrunqueue(&initproc->p_thread); /* XXXKSE */