RB_NOSYNC -> no device_shutdown ?
Andriy Gapon
avg at FreeBSD.org
Sat Dec 17 23:07:54 UTC 2011
I look at the following code:
static void
module_init(void *arg)
{
sx_init(&modules_sx, "module subsystem sx lock");
TAILQ_INIT(&modules);
EVENTHANDLER_REGISTER(shutdown_final, module_shutdown, NULL,
SHUTDOWN_PRI_DEFAULT);
}
SYSINIT(module, SI_SUB_KLD, SI_ORDER_FIRST, module_init, 0);
static void
module_shutdown(void *arg1, int arg2)
{
module_t mod;
if (arg2 & RB_NOSYNC)
return;
mtx_lock(&Giant);
MOD_SLOCK;
TAILQ_FOREACH_REVERSE(mod, &modules, modulelist, link)
MOD_EVENT(mod, MOD_SHUTDOWN);
MOD_SUNLOCK;
mtx_unlock(&Giant);
}
and wonder why RB_NOSYNC is overloaded to mean that no
MOD_SHUTDOWN/device_shutdown cleanup should be done?
--
Andriy Gapon
More information about the freebsd-hackers
mailing list