From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: Kevin Diggs <kevdig@hypersurf.com>
Subject: Re: to schedule() or not to schedule() ?
Date: Wed, 6 Aug 2008 23:12:10 +0200 [thread overview]
Message-ID: <200808062312.11078.arnd@arndb.de> (raw)
In-Reply-To: <4899059A.3020703@hypersurf.com>
On Wednesday 06 August 2008, Kevin Diggs wrote:
> For the purpose of learning, there is no direct, correct way to yield
> the cpu when in a timer fired routine, right?
>
No, in a timer, you interrupt a totally unrelated thread, so sleeping
would prevent that from running on, as well as preventing other timers
from being run, so it's not an option.
One thing that might work for you would be to re-arm the existing
timer and return from your function, so you get back to it after
a short while.
Arnd <><
prev parent reply other threads:[~2008-08-06 21:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-03 18:33 to schedule() or not to schedule() ? Kevin Diggs
2008-08-05 18:37 ` Chris Friesen
2008-08-05 19:26 ` Kevin Diggs
2008-08-05 23:00 ` Michael Ellerman
2008-08-06 1:59 ` Kevin Diggs
2008-08-06 21:12 ` Arnd Bergmann [this message]
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=200808062312.11078.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=kevdig@hypersurf.com \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).