> I've tried to read the sys_select() code but does not know what a jiffies
> is. The program works on Sun OK, showing a constant and consistant error.
"jiffies" is the clock value; I believe it gets incremented every 1/HZ
seconds by the timer interrupt.
> This is *very* ennoying. Anyone has an idea? What am I doing wrong?
Get the UTIME patch, apply it to an appropriate kernel, and rebuild
your kernel with UTIME enabled (and, preferably, APM disabled, so
that UTIME can rely on the cycle counter). UTIME is microsecond-
resolution timers; otherwise, you can only wake up from sleep/usleep/
nanosleep at a timer interrupt.
> The behaviour is exactly the same with select().
Yup. The system doesn't happen to get an interrupt which can trigger
the scheduler until the next scheduling interval, and the usual system
call overhead makes this the scheduling interval *after* the one you want.
Just as with sleep(2), you're guaranteed to sleep *at* *least* as long
as you asked for, unless interrupted. So a short-term/portable
solution is to just sleep for less time. The "right" solution is to
not rely on the OS to guarantee more than it really does, possibly
including patching the kernel to enable it to do what you want.
http://hegel.ittc.ukans.edu/projects/utime/ is your friend...
Keith (and pray the system load isn't too heavy...)
-- "The avalanche has already started; |Linux: http://www.linuxhq.com |"Zooty, it is too late for the pebbles to |KDE: http://www.kde.org | zoot vote." Kosh, "Believers", Babylon 5 |Keith: kwrohrer@enteract.com | zoot!" www.midwinter.com/lurk/lurker.html |http://www.enteract.com/~kwrohrer | --Rebo- 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.altern.org/andrebalsa/doc/lkml-faq.html