diff options
| author | freza <freza@NetBSD.org> | 2006-10-29 11:29:58 +0000 |
|---|---|---|
| committer | freza <freza@NetBSD.org> | 2006-10-29 11:29:58 +0000 |
| commit | e224ffd4eebaa02cdba2ae69f0fb4696308b5d51 (patch) | |
| tree | e4562883c9ce453c328f6d3c3ad94316b4b3ab37 /sys/dev/splash | |
| parent | ff7273278a9271a785c7427abab4289bcbaf4a97 (diff) | |
Inline UPDATE_INTERVAL macro, it's only used once. Per mrg@'s note
on previous.
Diffstat (limited to 'sys/dev/splash')
| -rw-r--r-- | sys/dev/splash/splash.c | 9 |
1 files changed, 4 insertions, 5 deletions
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 <jmcneill@invisible.ca> @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__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) |
