summaryrefslogtreecommitdiffstats
path: root/sys/sys/sched.h
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-04-11 03:39:07 +0000
committerjeff <jeff@FreeBSD.org>2003-04-11 03:39:07 +0000
commita033a840068cb5293a714269fd8d0f731259b542 (patch)
treebcd37429fc86aa97a6c5365898aad0fe73ea4633 /sys/sys/sched.h
parent86d593d3bd77f9805c1cb64e1be8cb329014c3ea (diff)
downloadFreeBSD-src-a033a840068cb5293a714269fd8d0f731259b542.zip
FreeBSD-src-a033a840068cb5293a714269fd8d0f731259b542.tar.gz
- Adjust sched hooks for fork and exec to take processes as arguments instead
of ksegs since they primarily operation on processes. - KSEs take ticks so pass the kse through sched_clock(). - Add a sched_class() routine that adjusts a ksegrp pri class. - Define a sched_fork_{kse,thread,ksegrp} and sched_exit_{kse,thread,ksegrp} that will be used to tell the scheduler about new instances of these structures within the same process. These will be used by THR and KSE. - Change sched_4bsd to reflect this API update.
Diffstat (limited to 'sys/sys/sched.h')
-rw-r--r--sys/sys/sched.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index 068911f..585ca5d 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -35,32 +35,43 @@
int sched_rr_interval(void);
int sched_runnable(void);
+/*
+ * Proc related scheduling hooks.
+ */
+void sched_exit(struct proc *p, struct proc *child);
+void sched_fork(struct proc *p, struct proc *child);
+
/*
* KSE Groups contain scheduling priority information. They record the
* behavior of groups of KSEs and threads.
*/
-void sched_exit(struct ksegrp *kg, struct ksegrp *child);
-void sched_fork(struct ksegrp *kg, struct ksegrp *child);
+void sched_class(struct ksegrp *kg, int class);
+void sched_exit_ksegrp(struct ksegrp *kg, struct ksegrp *child);
+void sched_fork_ksegrp(struct ksegrp *kg, struct ksegrp *child);
void sched_nice(struct ksegrp *kg, int nice);
-void sched_prio(struct thread *td, u_char prio);
-void sched_userret(struct thread *td);
/*
* Threads are switched in and out, block on resources, and have temporary
* priorities inherited from their ksegs.
*/
-void sched_clock(struct thread *td);
+void sched_exit_thread(struct thread *td, struct thread *child);
+void sched_fork_thread(struct thread *td, struct thread *child);
+void sched_prio(struct thread *td, u_char prio);
void sched_sleep(struct thread *td, u_char prio);
void sched_switchin(struct thread *td);
void sched_switchout(struct thread *td);
+void sched_userret(struct thread *td);
void sched_wakeup(struct thread *td);
/*
* KSEs are moved on and off of run queues.
*/
void sched_add(struct kse *ke);
-void sched_rem(struct kse *ke);
struct kse *sched_choose(void);
+void sched_clock(struct kse *ke);
+void sched_exit_kse(struct kse *ke, struct kse *child);
+void sched_fork_kse(struct kse *ke, struct kse *child);
+void sched_rem(struct kse *ke);
/*
* and they use up cpu time.
OpenPOWER on IntegriCloud