-/* $OpenBSD: kern_clock.c,v 1.119 2023/09/14 22:27:09 cheloha Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.120 2023/10/11 15:42:44 cheloha Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
/* Don't force early wrap around, triggers bug in inteldrm */
volatile unsigned long jiffies;
-uint32_t hardclock_period; /* [I] hardclock period (ns) */
-uint32_t statclock_avg; /* [I] average statclock period (ns) */
-uint32_t statclock_min; /* [I] minimum statclock period (ns) */
+uint64_t hardclock_period; /* [I] hardclock period (ns) */
+uint64_t statclock_avg; /* [I] average statclock period (ns) */
+uint64_t statclock_min; /* [I] minimum statclock period (ns) */
uint32_t statclock_mask; /* [I] set of allowed offsets */
int statclock_is_randomized; /* [I] fixed or pseudorandom period? */
void
initclocks(void)
{
- uint32_t half_avg, var;
+ uint64_t half_avg;
+ uint32_t var;
/*
* Let the machine-specific code do its bit.
/*
* Compute the average statclock() period. Then find var, the
- * largest power of two such that var <= statclock_avg / 2.
+ * largest 32-bit power of two such that var <= statclock_avg / 2.
*/
statclock_avg = 1000000000 / stathz;
half_avg = statclock_avg / 2;
-/* $OpenBSD: sched_bsd.c,v 1.87 2023/09/17 13:02:24 cheloha Exp $ */
+/* $OpenBSD: sched_bsd.c,v 1.88 2023/10/11 15:42:44 cheloha Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
#include <sys/ktrace.h>
#endif
-uint32_t roundrobin_period; /* [I] roundrobin period (ns) */
+uint64_t roundrobin_period; /* [I] roundrobin period (ns) */
int lbolt; /* once a second sleep address */
#ifdef MULTIPROCESSOR
-/* $OpenBSD: subr_prof.c,v 1.38 2023/09/10 03:08:05 cheloha Exp $ */
+/* $OpenBSD: subr_prof.c,v 1.39 2023/10/11 15:42:44 cheloha Exp $ */
/* $NetBSD: subr_prof.c,v 1.12 1996/04/22 01:38:50 christos Exp $ */
/*-
#include <sys/syscallargs.h>
#include <sys/user.h>
-uint32_t profclock_period;
+uint64_t profclock_period;
#if defined(GPROF) || defined(DDBPROF)
#include <sys/malloc.h>
-/* $OpenBSD: resourcevar.h,v 1.29 2023/09/10 03:08:05 cheloha Exp $ */
+/* $OpenBSD: resourcevar.h,v 1.30 2023/10/11 15:42:44 cheloha Exp $ */
/* $NetBSD: resourcevar.h,v 1.12 1995/11/22 23:01:53 cgd Exp $ */
/*
struct clockintr;
-extern uint32_t profclock_period;
+extern uint64_t profclock_period;
void addupc_intr(struct proc *, u_long, u_long);
void addupc_task(struct proc *, u_long, u_int);
-/* $OpenBSD: sched.h,v 1.64 2023/09/14 22:07:11 cheloha Exp $ */
+/* $OpenBSD: sched.h,v 1.65 2023/10/11 15:42:44 cheloha Exp $ */
/* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */
/*-
#define NICE_WEIGHT 2 /* priorities per nice level */
#define ESTCPULIM(e) min((e), NICE_WEIGHT * PRIO_MAX - SCHED_PPQ)
-extern uint32_t roundrobin_period;
+extern uint64_t roundrobin_period;
struct proc;
void schedclock(struct proc *);
-/* $OpenBSD: systm.h,v 1.167 2023/09/14 20:58:51 cheloha Exp $ */
+/* $OpenBSD: systm.h,v 1.168 2023/10/11 15:42:44 cheloha Exp $ */
/* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */
/*-
int tstohz(const struct timespec *);
void realitexpire(void *);
-extern uint32_t hardclock_period;
-extern uint32_t statclock_avg;
+extern uint64_t hardclock_period;
+extern uint64_t statclock_avg;
extern int statclock_is_randomized;
struct clockframe;