summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa/clock.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-09-30 06:42:47 +0000
committerpeter <peter@FreeBSD.org>2003-09-30 06:42:47 +0000
commitee83710173158891337f421fa1180b12b6eee5d3 (patch)
treea4a29f049a4b937574e17cbddfecd94f3a8076cd /sys/amd64/isa/clock.c
parent714b95391d6cb3683109685a51ee1c29b258f487 (diff)
downloadFreeBSD-src-ee83710173158891337f421fa1180b12b6eee5d3.zip
FreeBSD-src-ee83710173158891337f421fa1180b12b6eee5d3.tar.gz
MFi386: Do not depend on LEAPYEAR() macro boolean values being 0 or 1.
MFi386: Add quality field for timer0
Diffstat (limited to 'sys/amd64/isa/clock.c')
-rw-r--r--sys/amd64/isa/clock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 4af282e..0ae2849 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$");
* 32-bit time_t's can't reach leap years before 1904 or after 2036, so we
* can use a simple formula for leap years.
*/
-#define LEAPYEAR(y) ((u_int)(y) % 4 == 0)
+#define LEAPYEAR(y) (((u_int)(y) % 4 == 0) ? 1 : 0)
#define DAYSPERYEAR (31+28+31+30+31+30+31+31+30+31+30+31)
#define TIMER_DIV(x) ((timer_freq + (x) / 2) / (x))
@@ -162,7 +162,8 @@ static struct timecounter i8254_timecounter = {
0, /* no poll_pps */
~0u, /* counter_mask */
0, /* frequency */
- "i8254" /* name */
+ "i8254", /* name */
+ 0 /* quality */
};
static void
OpenPOWER on IntegriCloud