From: Jos Hulzink <josh@stack.nl>
To: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Why does a thread not sleep ?
Date: Thu, 16 Jan 2003 18:15:54 +0100 (CET) [thread overview]
Message-ID: <20030116175941.U29316-100000@snail.stack.nl> (raw)
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
reply other threads:[~2003-01-16 17:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030116175941.U29316-100000@snail.stack.nl \
--to=josh@stack.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox