public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Why does a thread not sleep ?
@ 2003-01-16 17:15 Jos Hulzink
  0 siblings, 0 replies; only message in thread
From: Jos Hulzink @ 2003-01-16 17:15 UTC (permalink / raw)
  To: Linux Kernel Development

Hello,

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
kernels.

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

Thanks,

Jos

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-16 17:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-16 17:15 Why does a thread not sleep ? Jos Hulzink

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox