diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-08-30 18:30:38 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-08-30 18:30:38 -0400 |
commit | 0a7d5f8ce960e74fa22986bda4af488539796e49 (patch) | |
tree | e29ad17808a5c3410518e22dae8dfe94801b59f3 /include/linux/jiffies.h | |
parent | 0165508c80a2b5d5268d9c5dfa9b30c534a33693 (diff) | |
parent | dc709bd190c130b299ac19d596594256265c042a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/jiffies.h')
-rw-r--r-- | include/linux/jiffies.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 043376920f51..329ebcffa106 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -47,8 +47,8 @@ | |||
47 | * - (NOM / DEN) fits in (32 - LSH) bits. | 47 | * - (NOM / DEN) fits in (32 - LSH) bits. |
48 | * - (NOM % DEN) fits in (32 - LSH) bits. | 48 | * - (NOM % DEN) fits in (32 - LSH) bits. |
49 | */ | 49 | */ |
50 | #define SH_DIV(NOM,DEN,LSH) ( ((NOM / DEN) << LSH) \ | 50 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ |
51 | + (((NOM % DEN) << LSH) + DEN / 2) / DEN) | 51 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) |
52 | 52 | ||
53 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ | 53 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ |
54 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) | 54 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) |