[lkml]   [2003]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectWhy does a thread not sleep ?

In a driver, in the bottom half of an interrupt handler, I use
set_task_state (task, TASK_INTERRUPTIBLE) to make a task sleeping.
Sometimes (about 50 % of the cases), the task wakes up immediately again,
even though no signals are sent to the task. I tried TASK_UNINTERRUPTIBLE
and TASK_STOPPED too, but the same thing happens.

Can it be the task state is returned to TASK_RUNNING again in some
situations by other code ? Should I use locking, even on uniprocessor
systems ? Can a modification of the task state get lost in some situations
? I know about SMP related issues, but this doesn't even work on UP

In other words: I don't get it. Help would be appreciated.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.030 / U:6.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site