summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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