FreeBSD/sys/kern/sched_ule.c
/*
 * Setup the thread queues and initialize the topology based on MD
 * information.
 */
Setup the thread queues and initialize the topology based on MD
information.
Setup the thread queues and initialize the topology based on MD information .
static void
sched_setup(void *dummy)
{
	struct tdq *tdq;
	tdq = TDQ_SELF();
#ifdef SMP
	sched_setup_smp();
#else
	tdq_setup(tdq);
#endif
	TDQ_LOCK(tdq);
	thread0.td_lock = TDQ_LOCKPTR(TDQ_SELF());
	tdq_load_add(tdq, &thread0);
	tdq->tdq_lowpri = thread0.td_priority;
	TDQ_UNLOCK(tdq);
}
static void sched_setup ( void * dummy ) { struct tdq * tdq ; tdq = TDQ_SELF ( ) ; #ifdef SMP sched_setup_smp ( ) ; #else tdq_setup ( tdq ) ; #endif TDQ_LOCK ( tdq ) ; thread0 . td_lock = TDQ_LOCKPTR ( TDQ_SELF ( ) ) ; tdq_load_add ( tdq , & thread0 ) ; tdq -> tdq_lowpri = thread0 . td_priority ; TDQ_UNLOCK ( tdq ) ; }
Setup the thread queues and initialize the topology based on MD
 information.
Setup the thread queues and initialize the topology based on MD information .
/* Add thread0's load since it's running. */