On 20:20 Mon 24 Mar , Amar Mudrankit wrote: > Hi, > > I want to ask about the new set of kernel thread APIs (kthread_) being > used in kernel. > > In my module, when certain thread was sleeping(TASK_INTERRUPTIBLE > state) and from other thread, I tried to stop this sleeping thread using > kthread_stop. The operation was not successful and kthread_stop did not > return. Is this behaviour expected? > > When I tried to google around it, I found > > http://lwn.net/Articles/118935/ > > which says that kthread_stop doesn't make use of signals to wake up > the sleeping thread and it is expected that sleeping thread should > periodically wake up and check for kthread_should_stop. Is it true? http://kerneltrap.org/man/linux/man9/kthread_should_stop.9 This seems pretty weird. But you could try using waitqueues as well. -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.homelinux.net -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ