From e224ffd4eebaa02cdba2ae69f0fb4696308b5d51 Mon Sep 17 00:00:00 2001 From: freza Date: Sun, 29 Oct 2006 11:29:58 +0000 Subject: Inline UPDATE_INTERVAL macro, it's only used once. Per mrg@'s note on previous. --- sys/dev/splash/splash.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/splash/splash.c b/sys/dev/splash/splash.c index ea99d3348c3..8fe2d31a139 100644 --- a/sys/dev/splash/splash.c +++ b/sys/dev/splash/splash.c @@ -1,4 +1,4 @@ -/* $NetBSD: splash.c,v 1.2 2006/10/28 02:21:36 freza Exp $ */ +/* $NetBSD: splash.c,v 1.3 2006/10/29 11:29:58 freza Exp $ */ /*- * Copyright (c) 2006 Jared D. McNeill @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: splash.c,v 1.2 2006/10/28 02:21:36 freza Exp $"); +__KERNEL_RCSID(0, "$NetBSD: splash.c,v 1.3 2006/10/29 11:29:58 freza Exp $"); #include "opt_splash.h" @@ -409,7 +409,6 @@ splash_progress_update(struct splash_progress *sp) return; #ifdef __HAVE_CPU_COUNTER -#define UPDATE_INTERVAL (cpu_frequency(curcpu()) / 4) if (cpu_hascounter()) { uint64_t now; @@ -417,12 +416,12 @@ splash_progress_update(struct splash_progress *sp) splash_last_update = cpu_counter(); } else { now = cpu_counter(); - if (splash_last_update + UPDATE_INTERVAL > now) + if (splash_last_update + cpu_frequency(curcpu())/4 > + now) return; splash_last_update = now; } } -#undef UPDATE_INTERVAL #endif sp->sp_state++; if (sp->sp_state >= SPLASH_PROGRESS_NSTATES) -- cgit