Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/uipc_domain.c
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | |||||
#ifndef INVARIANTS | #ifndef INVARIANTS | ||||
if (domain_init_status < 1) | if (domain_init_status < 1) | ||||
printf("WARNING: attempt to domain_add(%s) before " | printf("WARNING: attempt to domain_add(%s) before " | ||||
"domaininit()\n", dp->dom_name); | "domaininit()\n", dp->dom_name); | ||||
#endif | #endif | ||||
mtx_unlock(&dom_mtx); | mtx_unlock(&dom_mtx); | ||||
} | } | ||||
void | |||||
domain_remove(void *data) | |||||
{ | |||||
struct domain *dp = (struct domain *)data; | |||||
if ((dp->dom_flags & DOMF_UNLOADABLE) == 0) | |||||
return; | |||||
mtx_lock(&dom_mtx); | |||||
if (domains == dp) { | |||||
domains = dp->dom_next; | |||||
} else { | |||||
struct domain *curr; | |||||
for (curr = domains; curr != NULL; curr = curr->dom_next) { | |||||
if (curr->dom_next == dp) { | |||||
curr->dom_next = dp->dom_next; | |||||
break; | |||||
} | |||||
} | |||||
} | |||||
mtx_unlock(&dom_mtx); | |||||
} | |||||
/* ARGSUSED*/ | /* ARGSUSED*/ | ||||
static void | static void | ||||
domaininit(void *dummy) | domaininit(void *dummy) | ||||
{ | { | ||||
if (max_linkhdr < 16) /* XXX */ | if (max_linkhdr < 16) /* XXX */ | ||||
max_linkhdr = 16; | max_linkhdr = 16; | ||||
▲ Show 20 Lines • Show All 265 Lines • Show Last 20 Lines |