lkml.org 
[lkml]   [2008]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Return value from schedule()
On Thu, 4 Sep 2008 11:48:45 -0600
Matthew Wilcox <matthew@wil.cx> wrote:

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

Never mind, I changed it to just yield() in revision.


\
 
 \ /
  Last update: 2008-09-04 21:09    [W:0.165 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site