I need to kthread_run in a driver kernel code. This thread tends to turns an LED on/OFF where the device is transmitting data. So basically I won't want the transmission be slowed down be cause of the LED blinking delay time. I would like to create a thread somewhere around packet transmission code so the thread will do the LED blinking process based on the rate of transmission. But apparently creating a thread there requires interaction with the thread scheduler, which is not allowed at interrupt/atomic context and will generate the BUG:Scheduling while atomic. according to my research,an approach could be to create the kernel thread elsewhere, and queue interrupt request processing to it. Can someone please elaborate this a bit more?So this is not a case where we have interruption thread. I basically need a Function that has it's own thread away from my main thread. And I will call this function anytime! Please let me know if this is still unclear. Thanks.
↧