Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Dec 1999 23:58:59 -0700
From:      Warner Losh <imp@village.org>
To:        hackers@freebsd.org
Subject:   When can I call kthread_create?
Message-ID:  <199912200658.XAA11677@harmony.village.org>

next in thread | raw e-mail | index | archive | help

When can I call kthread_create?  I tried in the driver attach, but
that failed in fdcopy() calling vref with a NULL pointer.  I tried
calling at the end of config (in config_intrhook_establish called
function), but no dice.  I see that this makes its calls at
SI_SUB_INT_CONFIG_HOOKS (0xa800000 in init sequence).  I'd like to run
it before SI_SUB_COM_ROOT_CONF, but it doesn't look like I could call
it until SI_SUB_KTHREAD_INIT, which is too late to allow an insert
event to happen to allow a root device to be in a pccard/cardbus
(well, I could poll the device in attach routine if I'm not already
doing this, so that restriction might not be a big deal).

Is this analysis accurate?  Do I have to wait until at least
SI_SUB_KTHREAD_INIT?  Or is INIT special and I'd have to wait until
after all the "special" processes are created?

Thanks for your help in this matter.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912200658.XAA11677>