summaryrefslogtreecommitdiffstats
path: root/sys/sys/sched.h
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2006-12-06 06:34:57 +0000
committerjulian <julian@FreeBSD.org>2006-12-06 06:34:57 +0000
commit396ed947f6606e1c43668a24471edd3bc2d2303a (patch)
treec0bf9a3a56052122c3c551fe189b4979f9bf745b /sys/sys/sched.h
parenta5878e15cf129593dc7e00da508adbbd01fd98f0 (diff)
downloadFreeBSD-src-396ed947f6606e1c43668a24471edd3bc2d2303a.zip
FreeBSD-src-396ed947f6606e1c43668a24471edd3bc2d2303a.tar.gz
Threading cleanup.. part 2 of several.
Make part of John Birrell's KSE patch permanent.. Specifically, remove: Any reference of the ksegrp structure. This feature was never fully utilised and made things overly complicated. All code in the scheduler that tried to make threaded programs fair to unthreaded programs. Libpthread processes will already do this to some extent and libthr processes already disable it. Also: Since this makes such a big change to the scheduler(s), take the opportunity to rename some structures and elements that had to be moved anyhow. This makes the code a lot more readable. The ULE scheduler compiles again but I have no idea if it works. The 4bsd scheduler still reqires a little cleaning and some functions that now do ALMOST nothing will go away, but I thought I'd do that as a separate commit. Tested by David Xu, and Dan Eischen using libthr and libpthread.
Diffstat (limited to 'sys/sys/sched.h')
-rw-r--r--sys/sys/sched.h27
1 files changed, 4 insertions, 23 deletions
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index 69e4a0c..a9f1748 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -86,23 +86,15 @@ void sched_fork(struct thread *td, struct thread *childtd);
* KSE Groups contain scheduling priority information. They record the
* behavior of groups of KSEs and threads.
*/
-#ifdef KSE
-void sched_class(struct ksegrp *kg, int class);
-void sched_exit_ksegrp(struct ksegrp *kg, struct thread *childtd);
-void sched_fork_ksegrp(struct thread *td, struct ksegrp *child);
-#else
void sched_class(struct thread *td, int class);
-#endif
void sched_nice(struct proc *p, int nice);
/*
* Threads are switched in and out, block on resources, have temporary
- * priorities inherited from their ksegs, and use up cpu time.
+ * priorities inherited from their procs, and use up cpu time.
*/
-#ifdef KSE
void sched_exit_thread(struct thread *td, struct thread *child);
void sched_fork_thread(struct thread *td, struct thread *child);
-#endif
void sched_lend_prio(struct thread *td, u_char prio);
void sched_lend_user_prio(struct thread *td, u_char pri);
fixpt_t sched_pctcpu(struct thread *td);
@@ -111,11 +103,7 @@ void sched_sleep(struct thread *td);
void sched_switch(struct thread *td, struct thread *newtd, int flags);
void sched_unlend_prio(struct thread *td, u_char prio);
void sched_unlend_user_prio(struct thread *td, u_char pri);
-#ifdef KSE
-void sched_user_prio(struct ksegrp *kg, u_char prio);
-#else
void sched_user_prio(struct thread *td, u_char prio);
-#endif
void sched_userret(struct thread *td);
void sched_wakeup(struct thread *td);
@@ -142,9 +130,6 @@ int sched_is_bound(struct thread *td);
* These procedures tell the process data structure allocation code how
* many bytes to actually allocate.
*/
-#ifdef KSE
-int sched_sizeof_ksegrp(void);
-#endif
int sched_sizeof_proc(void);
int sched_sizeof_thread(void);
@@ -162,15 +147,11 @@ sched_unpin(void)
/* temporarily here */
void schedinit(void);
-#ifdef KSE
-void sched_init_concurrency(struct ksegrp *kg);
-void sched_set_concurrency(struct ksegrp *kg, int cuncurrency);
-#endif
+void sched_init_concurrency(struct proc *p);
+void sched_set_concurrency(struct proc *p, int cuncurrency);
void sched_schedinit(void);
-#ifdef KSE
-void sched_newproc(struct proc *p, struct ksegrp *kg, struct thread *td);
+void sched_newproc(struct proc *p, struct thread *td);
void sched_thread_exit(struct thread *td);
-#endif
void sched_newthread(struct thread *td);
#endif /* _KERNEL */
OpenPOWER on IntegriCloud