Inline UPDATE_INTERVAL macro, it's only used once. Per mrg@'s note
on previous.
This commit is contained in:
parent
ff7273278a
commit
e224ffd4ee
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue