-/* $OpenBSD: param.c,v 1.47 2022/04/13 10:08:10 sthen Exp $ */
+/* $OpenBSD: param.c,v 1.48 2023/03/03 20:16:44 cheloha Exp $ */
/* $NetBSD: param.c,v 1.16 1996/03/12 03:08:40 mrg Exp $ */
/*
* Compiled with -DHZ=xx -DMAXUSERS=xx
*/
-#ifndef HZ
-#define HZ 100
-#endif
int hz = HZ;
int tick = 1000000 / HZ;
int tick_nsec = 1000000000 / HZ;
-/* $OpenBSD: kern_clock.c,v 1.106 2023/02/04 19:33:03 cheloha Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.107 2023/03/03 20:16:44 cheloha Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
int schedhz;
int profhz;
int profprocs;
-int ticks;
+int ticks = INT_MAX - (15 * 60 * HZ);
static int psdiv, pscnt; /* prof => stat divider */
int psratio; /* ratio: prof / stat */
-volatile unsigned long jiffies; /* XXX Linux API for drm(4) */
+volatile unsigned long jiffies = ULONG_MAX - (10 * 60 * HZ);
/*
* Initialize clock frequencies and start both clocks running.
void
initclocks(void)
{
- ticks = INT_MAX - (15 * 60 * hz);
- jiffies = ULONG_MAX - (10 * 60 * hz);
-
/*
* Set divisors to 1 (normal case) and let the machine-specific
* code do its bit.
-/* $OpenBSD: kernel.h,v 1.25 2021/01/13 16:28:50 cheloha Exp $ */
+/* $OpenBSD: kernel.h,v 1.26 2023/03/03 20:16:44 cheloha Exp $ */
/* $NetBSD: kernel.h,v 1.11 1995/03/03 01:24:16 cgd Exp $ */
/*-
extern int stathz; /* statistics clock's frequency */
extern int profhz; /* profiling clock's frequency */
extern int lbolt; /* once a second sleep address */
+
+#ifndef HZ
+#define HZ 100
+#endif