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

Function init_sleepqueues

freebsd/kern/subr_sleepqueue.c:218–236  ·  view source on GitHub ↗

* Early initialization of sleep queues that is called from the sleepinit() * SYSINIT. */

Source from the content-addressed store, hash-verified

216 * SYSINIT.
217 */
218void
219init_sleepqueues(void)
220{
221 int i;
222
223 for (i = 0; i < SC_TABLESIZE; i++) {
224 LIST_INIT(&sleepq_chains[i].sc_queues);
225 mtx_init(&sleepq_chains[i].sc_lock, "sleepq chain", NULL,
226 MTX_SPIN);
227 }
228 sleepq_zone = uma_zcreate("SLEEPQUEUE", sizeof(struct sleepqueue),
229#ifdef INVARIANTS
230 NULL, sleepq_dtor, sleepq_init, NULL, UMA_ALIGN_CACHE, 0);
231#else
232 NULL, NULL, sleepq_init, NULL, UMA_ALIGN_CACHE, 0);
233#endif
234
235 thread0.td_sleepqueue = sleepq_alloc();
236}
237
238/*
239 * Get a sleep queue for a new thread.

Callers 1

sleepinitFunction · 0.85

Calls 3

mtx_initFunction · 0.85
uma_zcreateFunction · 0.85
sleepq_allocFunction · 0.85

Tested by

no test coverage detected