summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_clock.c
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/kern/kern_clock.c
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/kern/kern_clock.c')
-rw-r--r--sys/kern/kern_clock.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index cd98bdd..a3732a8 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -203,23 +203,12 @@ hardclock_cpu(int usermode)
mtx_lock_spin_flags(&sched_lock, MTX_QUIET);
sched_tick();
#ifdef KSE
+#if 0 /* for now do nothing */
if (p->p_flag & P_SA) {
- /* XXXKSE What to do? */
- } else {
- pstats = p->p_stats;
- if (usermode &&
- timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value) &&
- itimerdecr(&pstats->p_timer[ITIMER_VIRTUAL], tick) == 0) {
- p->p_sflag |= PS_ALRMPEND;
- td->td_flags |= TDF_ASTPENDING;
- }
- if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value) &&
- itimerdecr(&pstats->p_timer[ITIMER_PROF], tick) == 0) {
- p->p_sflag |= PS_PROFPEND;
- td->td_flags |= TDF_ASTPENDING;
- }
+ /* XXXKSE What to do? Should do more. */
}
-#else
+#endif
+#endif
pstats = p->p_stats;
if (usermode &&
timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value) &&
@@ -232,7 +221,6 @@ hardclock_cpu(int usermode)
p->p_sflag |= PS_PROFPEND;
td->td_flags |= TDF_ASTPENDING;
}
-#endif
mtx_unlock_spin_flags(&sched_lock, MTX_QUIET);
#ifdef HWPMC_HOOKS
OpenPOWER on IntegriCloud