summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/sys/sched.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index cd804cc..1f8f338 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -51,11 +51,12 @@ void sched_fork_ksegrp(struct ksegrp *kg, struct ksegrp *child);
void sched_nice(struct ksegrp *kg, int nice);
/*
- * Threads are switched in and out, block on resources, and have temporary
- * priorities inherited from their ksegs.
+ * Threads are switched in and out, block on resources, have temporary
+ * priorities inherited from their ksegs, and use up cpu time.
*/
void sched_exit_thread(struct thread *td, struct thread *child);
void sched_fork_thread(struct thread *td, struct thread *child);
+fixpt_t sched_pctcpu(struct thread *td);
void sched_prio(struct thread *td, u_char prio);
void sched_sleep(struct thread *td, u_char prio);
void sched_switch(struct thread *td);
@@ -63,19 +64,27 @@ void sched_userret(struct thread *td);
void sched_wakeup(struct thread *td);
/*
- * KSEs are moved on and off of run queues.
+ * Threads are moved on and off of run queues
*/
void sched_add(struct thread *td);
-struct kse *sched_choose(void);
+struct kse *sched_choose(void); /* XXX Should be thread * */
void sched_clock(struct thread *td);
-void sched_exit_kse(struct kse *ke, struct kse *child);
-void sched_fork_kse(struct kse *ke, struct kse *child);
void sched_rem(struct thread *td);
/*
- * and they use up cpu time.
+ * Binding makes cpu affinity permanent while pinning is used to temporarily
+ * hold a thread on a particular CPU.
*/
-fixpt_t sched_pctcpu(struct thread *td);
+void sched_bind(struct thread *td, int cpu);
+void sched_pin(struct thread *td);
+void sched_unbind(struct thread *td);
+void sched_unpin(struct thread *td);
+
+/*
+ * These interfaces will eventually be removed.
+ */
+void sched_exit_kse(struct kse *ke, struct kse *child);
+void sched_fork_kse(struct kse *ke, struct kse *child);
/*
* These procedures tell the process data structure allocation code how
OpenPOWER on IntegriCloud