summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-11-21 09:14:13 +0000
committerjeff <jeff@FreeBSD.org>2002-11-21 09:14:13 +0000
commit86248f7d291801590b224272bc6e5b94e6ed5cea (patch)
treed2494bfa3785e97d3bab130fbe3886ccb96e7a81 /sys
parent07d36defefe91253b9194a663eeac6867b1c5a0f (diff)
downloadFreeBSD-src-86248f7d291801590b224272bc6e5b94e6ed5cea.zip
FreeBSD-src-86248f7d291801590b224272bc6e5b94e6ed5cea.tar.gz
- Move scheduler specific macros and defines out of proc.h
Approved by: re
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/sched_4bsd.c10
-rw-r--r--sys/sys/proc.h12
2 files changed, 10 insertions, 12 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 06ea638..04ed3f3 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -51,6 +51,16 @@
#include <sys/sysctl.h>
#include <sys/sx.h>
+/*
+ * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in
+ * the range 100-256 Hz (approximately).
+ */
+#define ESTCPULIM(e) \
+ min((e), INVERSE_ESTCPU_WEIGHT * (NICE_WEIGHT * (PRIO_MAX - PRIO_MIN) - \
+ RQ_PPQ) + INVERSE_ESTCPU_WEIGHT - 1)
+#define INVERSE_ESTCPU_WEIGHT 8 /* 1 / (priorities per estcpu level). */
+#define NICE_WEIGHT 1 /* Priorities per nice level. */
+
struct ke_sched *kse0_sched = NULL;
struct kg_sched *ksegrp0_sched = NULL;
struct p_sched *proc0_sched = NULL;
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index c0225cc..c04458e 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -844,18 +844,6 @@ extern struct uma_zone *proc_zone;
extern int lastpid;
-/*
- * XXX macros for scheduler. Shouldn't be here, but currently needed for
- * bounding the dubious p_estcpu inheritance in wait1().
- * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in
- * the range 100-256 Hz (approximately).
- */
-#define ESTCPULIM(e) \
- min((e), INVERSE_ESTCPU_WEIGHT * (NICE_WEIGHT * (PRIO_MAX - PRIO_MIN) - \
- RQ_PPQ) + INVERSE_ESTCPU_WEIGHT - 1)
-#define INVERSE_ESTCPU_WEIGHT 8 /* 1 / (priorities per estcpu level). */
-#define NICE_WEIGHT 1 /* Priorities per nice level. */
-
struct proc *pfind(pid_t); /* Find process by id. */
struct pgrp *pgfind(pid_t); /* Find process group by id. */
struct proc *zpfind(pid_t); /* Find zombie process by id. */
OpenPOWER on IntegriCloud