mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Move timecounters notion of frequency to 64 bits.
[WARNING: CPUs in the distant future may be closer than they appear!]
This commit is contained in:
parent
c152df28e5
commit
60ca399653
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110038
@ -12,6 +12,7 @@
|
||||
#include "opt_ntp.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stdint.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/systm.h>
|
||||
@ -282,8 +283,8 @@ tc_init(struct timecounter *tc)
|
||||
{
|
||||
unsigned u;
|
||||
|
||||
printf("Timecounter \"%s\" frequency %lu Hz",
|
||||
tc->tc_name, (u_long)tc->tc_frequency);
|
||||
printf("Timecounter \"%s\" frequency %ju Hz",
|
||||
tc->tc_name, (intmax_t)tc->tc_frequency);
|
||||
|
||||
u = tc->tc_frequency / tc->tc_counter_mask;
|
||||
if (u > hz) {
|
||||
@ -299,7 +300,7 @@ tc_init(struct timecounter *tc)
|
||||
}
|
||||
|
||||
/* Report the frequency of the current timecounter. */
|
||||
u_int32_t
|
||||
u_int64_t
|
||||
tc_getfrequency(void)
|
||||
{
|
||||
|
||||
|
@ -47,7 +47,7 @@ struct timecounter {
|
||||
*/
|
||||
u_int tc_counter_mask;
|
||||
/* This mask should mask off any unimplemented bits. */
|
||||
u_int32_t tc_frequency;
|
||||
u_int64_t tc_frequency;
|
||||
/* Frequency of the counter in Hz. */
|
||||
char *tc_name;
|
||||
/* Name of the timecounter. */
|
||||
@ -59,7 +59,7 @@ struct timecounter {
|
||||
|
||||
extern struct timecounter *timecounter;
|
||||
|
||||
u_int32_t tc_getfrequency(void);
|
||||
u_int64_t tc_getfrequency(void);
|
||||
void tc_init(struct timecounter *tc);
|
||||
void tc_setclock(struct timespec *ts);
|
||||
void tc_ticktock(void);
|
||||
|
Loading…
Reference in New Issue
Block a user