Subject: Re: Kernel threads
To: None <email@example.com>
From: Bharani Chadalavada <firstname.lastname@example.org>
Date: 02/03/2001 17:37:33
OK. I started playing with this and I wrote a small kernel thread which is
awakened periodically by the interrupt service routine. Basically I have something
tsleep(&do_monitor, PWCHAN, "bharani", 0); /* PWCHAN = 12 */
and I have my interrupt service routine coded like this :
(I am running NetBSD on our hardware simulator and I put break points on the
kernel thread routine)
I can see the thread being created (when I do ps, I see "bharani"). But it does
not seem to be getting scheduled at all. Obviously I am missing something. I think
I am giving it a wrong priority or something. Could you please figure out what I
am doing wrong??
Bill Sommerfeld wrote:
> > When you say, extremely early boot, it is device configuration??
> Yes (well, at least the parts of device config which run before
> interrupts are enabled and the process scheduler is started).
> On some platforms (i386 comes to mind) there are dependancies which
> make it difficult to correctly initialize thread state before certain
> key drivers have been attached.
> > And I assume that the kthread_run_deferred_queue() is the one which calls all
> > these call-back functions. Am I right?