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

Function init_unrhdr

freebsd/kern/subr_unit.c:334–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334void
335init_unrhdr(struct unrhdr *uh, int low, int high, struct mtx *mutex)
336{
337
338 KASSERT(low >= 0 && low <= high,
339 ("UNR: use error: new_unrhdr(%d, %d)", low, high));
340 if (mutex != NULL)
341 uh->mtx = mutex;
342 else
343 uh->mtx = &unitmtx;
344 TAILQ_INIT(&uh->head);
345 TAILQ_INIT(&uh->ppfree);
346 uh->low = low;
347 uh->high = high;
348 uh->first = 0;
349 uh->last = 1 + (high - low);
350 check_unrhdr(uh, __LINE__);
351}
352
353/*
354 * Allocate a new unrheader set.

Callers 2

new_unrhdrFunction · 0.85
clear_unrhdrFunction · 0.85

Calls 1

check_unrhdrFunction · 0.85

Tested by

no test coverage detected