lkml.org 
[lkml]   [1998]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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 13:42    [W:0.028 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site