From: "Lahti Oy" <rlahti@netikka.fi>
To: <linux-kernel@vger.kernel.org>
Subject: schedule_timeout()
Date: Tue, 20 Aug 2002 20:41:41 +0300 [thread overview]
Message-ID: <000b01c24870$d8419970$d20a5f0a@deldaran> (raw)
Why does schedule_timeout() take a signed long as an argument and then check
for possible negative values? Wouldn't it be better to just take an unsigned
long as argument, thus eliminating all dumb checks in the code?
Also, couldn't MAX_SCHEDULE_TIMEOUT be defined zero to make checking for it
faster (actually I did find five calls to schedule_timeout() using zero
timeout, but couldn't they just use plain schedule() instead?)?
Another issue I found concerns setting current task state to TASK_RUNNING
after calling schedule_timeout(). This seems to be done in many parts of the
kernel, though Kernel-API documentations found from kernelnewbies.org seem
to claim that task state is guaranteed to be TASK_RUNNING after
schedule_timeout() returns. Is the documentation faulty or does the kernel
have obsoleted code?
next reply other threads:[~2002-08-20 18:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-20 17:41 Lahti Oy [this message]
2002-08-20 18:40 ` schedule_timeout() Andrew Morton
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='000b01c24870$d8419970$d20a5f0a@deldaran' \
--to=rlahti@netikka.fi \
--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