Re: calling soo_write() from itimer handler
[email protected] (Michael van Elst)
| Newsgroups | gmane.os.netbsd.devel.kernel |
|---|---|
| Organization | Serpens User Group |
| Message-ID | <[email protected]> |
[email protected] (Beesdeckar) writes: >I have kernel 10.1 rebuilt with DEBUG LOCKDEBUG and DIAGNOSTIC flags to >test my kernel module. >When used release kernel 10.1 then it runs and soo_write() does its work >fine. In my debug version of kernel compiled with above flags it stops >on assert_sleepable(), stack is added below. >My questions are: >If soo_write() cannot be called from software interrupt what should I >change to call soo_write() on kernel timer tick ? soo_write() may sleep, and that's not allowed in software interrupts. You need to run soo_write() from a kernel thread (often a work queue is used which implies a thread). Since the thread runs asynchronously, you have to decide what to do, when the timer expires while the previous action hasn't finished yet.