Namespace cleanup. Remove some #includes in favour of an explicit
declaration. Asked for by: bde
This commit is contained in:
parent
4cb1e53914
commit
4a3a2f0704
@ -169,7 +169,12 @@ static u_int timer0_prescaler_count;
|
||||
static u_char timer0_state;
|
||||
static u_char timer2_state;
|
||||
static void (*timer_func) __P((struct clockframe *frame)) = hardclock;
|
||||
#if defined(I386_CPU) || defined(I486_CPU)
|
||||
u_int tsc_present; /* Not static; other parts of the kernel
|
||||
* Need to know this */
|
||||
#else
|
||||
static u_int tsc_present;
|
||||
#endif
|
||||
|
||||
static unsigned i8254_get_timecount __P((struct timecounter *tc));
|
||||
static unsigned tsc_get_timecount __P((struct timecounter *tc));
|
||||
|
@ -47,8 +47,6 @@
|
||||
#include <machine/frame.h>
|
||||
#include <machine/segments.h>
|
||||
#include <machine/globals.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/specialreg.h>
|
||||
|
||||
/*
|
||||
* definitions of cpu-dependent requirements
|
||||
@ -145,9 +143,10 @@ static __inline u_int64_t
|
||||
get_cyclecount(void)
|
||||
{
|
||||
#if defined(I386_CPU) || defined(I486_CPU)
|
||||
extern u_int tsc_present;
|
||||
struct timespec tv;
|
||||
|
||||
if ((cpu_feature & CPUID_TSC) == 0) {
|
||||
if (!tsc_present) {
|
||||
nanotime(&tv);
|
||||
return (tv.tv_sec * (u_int64_t)1000000000 + tv.tv_nsec);
|
||||
}
|
||||
|
@ -169,7 +169,12 @@ static u_int timer0_prescaler_count;
|
||||
static u_char timer0_state;
|
||||
static u_char timer2_state;
|
||||
static void (*timer_func) __P((struct clockframe *frame)) = hardclock;
|
||||
#if defined(I386_CPU) || defined(I486_CPU)
|
||||
u_int tsc_present; /* Not static; other parts of the kernel
|
||||
* Need to know this */
|
||||
#else
|
||||
static u_int tsc_present;
|
||||
#endif
|
||||
|
||||
static unsigned i8254_get_timecount __P((struct timecounter *tc));
|
||||
static unsigned tsc_get_timecount __P((struct timecounter *tc));
|
||||
|
@ -169,7 +169,12 @@ static u_int timer0_prescaler_count;
|
||||
static u_char timer0_state;
|
||||
static u_char timer2_state;
|
||||
static void (*timer_func) __P((struct clockframe *frame)) = hardclock;
|
||||
#if defined(I386_CPU) || defined(I486_CPU)
|
||||
u_int tsc_present; /* Not static; other parts of the kernel
|
||||
* Need to know this */
|
||||
#else
|
||||
static u_int tsc_present;
|
||||
#endif
|
||||
|
||||
static unsigned i8254_get_timecount __P((struct timecounter *tc));
|
||||
static unsigned tsc_get_timecount __P((struct timecounter *tc));
|
||||
|
@ -47,8 +47,6 @@
|
||||
#include <machine/frame.h>
|
||||
#include <machine/segments.h>
|
||||
#include <machine/globals.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/specialreg.h>
|
||||
|
||||
/*
|
||||
* definitions of cpu-dependent requirements
|
||||
@ -145,9 +143,10 @@ static __inline u_int64_t
|
||||
get_cyclecount(void)
|
||||
{
|
||||
#if defined(I386_CPU) || defined(I486_CPU)
|
||||
extern u_int tsc_present;
|
||||
struct timespec tv;
|
||||
|
||||
if ((cpu_feature & CPUID_TSC) == 0) {
|
||||
if (!tsc_present) {
|
||||
nanotime(&tv);
|
||||
return (tv.tv_sec * (u_int64_t)1000000000 + tv.tv_nsec);
|
||||
}
|
||||
|
@ -169,7 +169,12 @@ static u_int timer0_prescaler_count;
|
||||
static u_char timer0_state;
|
||||
static u_char timer2_state;
|
||||
static void (*timer_func) __P((struct clockframe *frame)) = hardclock;
|
||||
#if defined(I386_CPU) || defined(I486_CPU)
|
||||
u_int tsc_present; /* Not static; other parts of the kernel
|
||||
* Need to know this */
|
||||
#else
|
||||
static u_int tsc_present;
|
||||
#endif
|
||||
|
||||
static unsigned i8254_get_timecount __P((struct timecounter *tc));
|
||||
static unsigned tsc_get_timecount __P((struct timecounter *tc));
|
||||
|
@ -169,7 +169,12 @@ static u_int timer0_prescaler_count;
|
||||
static u_char timer0_state;
|
||||
static u_char timer2_state;
|
||||
static void (*timer_func) __P((struct clockframe *frame)) = hardclock;
|
||||
#if defined(I386_CPU) || defined(I486_CPU)
|
||||
u_int tsc_present; /* Not static; other parts of the kernel
|
||||
* Need to know this */
|
||||
#else
|
||||
static u_int tsc_present;
|
||||
#endif
|
||||
|
||||
static unsigned i8254_get_timecount __P((struct timecounter *tc));
|
||||
static unsigned tsc_get_timecount __P((struct timecounter *tc));
|
||||
|
Loading…
Reference in New Issue
Block a user