FreeBSD/sys/kern/subr_pcpu.c
/*
 * Initialize the MI portions of a struct pcpu.
 */
Initialize the MI portions of a struct pcpu.
Initialize the MI portions of a struct pcpu .
void
pcpu_init(struct pcpu *pcpu, int cpuid, size_t size)
{
	bzero(pcpu, size);
	KASSERT(cpuid >= 0 && cpuid < MAXCPU,
	    ("pcpu_init: invalid cpuid %d", cpuid));
	pcpu->pc_cpuid = cpuid;
	cpuid_to_pcpu[cpuid] = pcpu;
	STAILQ_INSERT_TAIL(&cpuhead, pcpu, pc_allcpu);
	cpu_pcpu_init(pcpu, cpuid, size);
	pcpu->pc_rm_queue.rmq_next = &pcpu->pc_rm_queue;
	pcpu->pc_rm_queue.rmq_prev = &pcpu->pc_rm_queue;
}
void pcpu_init ( struct pcpu * pcpu , int cpuid , size_t size ) { bzero ( pcpu , size ) ; KASSERT ( cpuid >= 0 && cpuid < MAXCPU , ( " " , cpuid ) ) ; pcpu -> pc_cpuid = cpuid ; cpuid_to_pcpu [ cpuid ] = pcpu ; STAILQ_INSERT_TAIL ( & cpuhead , pcpu , pc_allcpu ) ; cpu_pcpu_init ( pcpu , cpuid , size ) ; pcpu -> pc_rm_queue . rmq_next = & pcpu -> pc_rm_queue ; pcpu -> pc_rm_queue . rmq_prev = & pcpu -> pc_rm_queue ; }
Initialize the MI portions of a struct pcpu.
Initialize the MI portions of a struct pcpu .