MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sched_setup

Function sched_setup

freebsd/kern/sched_ule.c:1449–1467  ·  view source on GitHub ↗

* Setup the thread queues and initialize the topology based on MD * information. */

Source from the content-addressed store, hash-verified

1447 * information.
1448 */
1449static void
1450sched_setup(void *dummy)
1451{
1452 struct tdq *tdq;
1453
1454#ifdef SMP
1455 sched_setup_smp();
1456#else
1457 tdq_setup(TDQ_SELF(), 0);
1458#endif
1459 tdq = TDQ_SELF();
1460
1461 /* Add thread0's load since it's running. */
1462 TDQ_LOCK(tdq);
1463 thread0.td_lock = TDQ_LOCKPTR(tdq);
1464 tdq_load_add(tdq, &thread0);
1465 tdq->tdq_lowpri = thread0.td_priority;
1466 TDQ_UNLOCK(tdq);
1467}
1468
1469/*
1470 * This routine determines time constants after stathz and hz are setup.

Callers

nothing calls this directly

Calls 3

sched_setup_smpFunction · 0.85
tdq_setupFunction · 0.85
tdq_load_addFunction · 0.85

Tested by

no test coverage detected