lkml.org 
[lkml]   [1998]   [Jun]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 2 Jun 1998 14:19:42 +0200 (MET DST)
FromFinn Arne Gangstad <>
SubjectRe: sched.c documentation patch

On Tue, 2 Jun 1998, Colin Plumb wrote:

> The code is neat, but could be commented a bit better.
> In particular, I think the invariant relationship between
> tv?.index and timer_jiffies should be made clear so no future
> hacker messes it up.
> 
> I also fixed a jiffies-overflow buglet (it requires a delay
> of greater than 1<<26 jiffies that spans jiffies wrapping 2^32,
> which is pretty unlikely) so that it works right.
> 
> Note that delays over 2^31 jiffies don't work on 32-bit platforms, so
> perhaps a more vigorous complaint in the handling for that case
> is in order.

Note that a lot of code expects to be able to compare jiffies with
unsigned < to see what event is supposed to be first. Ingo Molnar once
suggested to replace all such checks with BEFORE() and AFTER() macros
which were defined something like

#define BEFORE(a, b) ((long)((a) - (b)) < 0L)
#define AFTER(a, b) ((long)((a) - (b)) > 0L)
But nothing happened (I think)


- Finn Arne


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 12:42    [from the cache]
©2003-2008