[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080904174845.GN2772@parisc-linux.org>
Date: Thu, 4 Sep 2008 11:48:45 -0600
From: Matthew Wilcox <matthew@....cx>
To: Arjan van de Ven <arjan@...radead.org>
Cc: Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
Linus Torvalds <torvalds@...l.org>,
Andrew Morton <akpm@...l.org>,
Ben Hutchings <bhutchings@...arflare.com>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linux-pci@...r.kernel.org,
Stephen Hemminger <shemminger@...tta.com>
Subject: Re: [PATCH] Return value from schedule()
On Thu, Sep 04, 2008 at 10:30:49AM -0700, Arjan van de Ven wrote:
> use schedule_hrtimerout() for this (hopefully will be in 2.6.28);
> see this weeks LWN for an article describing it
OK, so something like:
struct timespec ts = { 0, 10 * 1000 };
set_task_state(TASK_INTERRUPTIBLE);
schedule_hrtimeout(&ts, HRTIMER_MODE_REL);
if (fatal_signal_pending())
return -EINTR;
should do the trick.
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists