kern_idle.c (87702) | kern_idle.c (88088) |
---|---|
1/*- 2 * Copyright (c) 2000, All rights reserved. See /usr/src/COPYRIGHT 3 * | 1/*- 2 * Copyright (c) 2000, All rights reserved. See /usr/src/COPYRIGHT 3 * |
4 * $FreeBSD: head/sys/kern/kern_idle.c 87702 2001-12-11 23:33:44Z jhb $ | 4 * $FreeBSD: head/sys/kern/kern_idle.c 88088 2001-12-18 00:27:18Z jhb $ |
5 */ 6 7#include "opt_ktrace.h" 8 9#include <sys/param.h> 10#include <sys/systm.h> 11#include <sys/kernel.h> 12#include <sys/ktr.h> --- 29 unchanged lines hidden (view full) --- 42 struct proc *p; 43 int error; 44 45#ifdef SMP 46 SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { 47 error = kthread_create(idle_proc, NULL, &p, 48 RFSTOPPED | RFHIGHPID, "idle: cpu%d", pc->pc_cpuid); 49 pc->pc_idlethread = &p->p_thread; | 5 */ 6 7#include "opt_ktrace.h" 8 9#include <sys/param.h> 10#include <sys/systm.h> 11#include <sys/kernel.h> 12#include <sys/ktr.h> --- 29 unchanged lines hidden (view full) --- 42 struct proc *p; 43 int error; 44 45#ifdef SMP 46 SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { 47 error = kthread_create(idle_proc, NULL, &p, 48 RFSTOPPED | RFHIGHPID, "idle: cpu%d", pc->pc_cpuid); 49 pc->pc_idlethread = &p->p_thread; |
50 if (pc->pc_curthread == NULL) | 50 if (pc->pc_curthread == NULL) { |
51 pc->pc_curthread = pc->pc_idlethread; | 51 pc->pc_curthread = pc->pc_idlethread; |
52 pc->pc_idlethread->td_critnest = 0; 53 } |
|
52#else 53 error = kthread_create(idle_proc, NULL, &p, 54 RFSTOPPED | RFHIGHPID, "idle"); 55 PCPU_SET(idlethread, &p->p_thread); 56#endif 57 if (error) 58 panic("idle_setup: kthread_create error %d\n", error); 59 --- 49 unchanged lines hidden --- | 54#else 55 error = kthread_create(idle_proc, NULL, &p, 56 RFSTOPPED | RFHIGHPID, "idle"); 57 PCPU_SET(idlethread, &p->p_thread); 58#endif 59 if (error) 60 panic("idle_setup: kthread_create error %d\n", error); 61 --- 49 unchanged lines hidden --- |