lkml.org 
[lkml]   [1999]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Can't sleep less than 20 ms
Boussard Per wrote:
>
> On Fri, 2 Jul 1999, Andrea Arcangeli wrote:
>
> >
> > Set the policy of the scheduler as RT.
> >
>
> This will only work for root, no? The problem is the tv_sec||tv_nsec
> expression in sys_nanosleep(). I think this must go.

This seems to be correct, I changed

expire = timespec_to_jiffies(&t) + (t.tv_sec || t.tv_nsec);
to
expire = timespec_to_jiffies(&t);

in sys_nanosleep(), now I got

usleep ( <=10*1000) sleeps for 10 ms
usleep ( >10*1000 <= 20*1000) sleeps for 20 ms
usleep ( >20*1000 <= 30*1000) sleeps for 30 ms

Dong

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:1.073 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site