From owner-freebsd-hackers Sun Dec 19 22:59: 3 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 2CC8114EC9 for ; Sun, 19 Dec 1999 22:59:01 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id XAA10049 for ; Sun, 19 Dec 1999 23:58:59 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id XAA11677 for ; Sun, 19 Dec 1999 23:58:59 -0700 (MST) Message-Id: <199912200658.XAA11677@harmony.village.org> To: hackers@freebsd.org Subject: When can I call kthread_create? Date: Sun, 19 Dec 1999 23:58:59 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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