diff options
author | Jeff Roberson <jeff@FreeBSD.org> | 2007-01-23 08:46:51 +0000 |
---|---|---|
committer | Jeff Roberson <jeff@FreeBSD.org> | 2007-01-23 08:46:51 +0000 |
commit | f0393f063afda7922a21fb106dd66b5203ca5ccd (patch) | |
tree | b133e2bceeb7a9d12a55f7f5eda206c4edcf51e2 /sys/kern/subr_turnstile.c | |
parent | 3c93ca7d2fabfd6aaa0ef3555e55d9b596b9c6a4 (diff) | |
download | src-f0393f063afda7922a21fb106dd66b5203ca5ccd.tar.gz src-f0393f063afda7922a21fb106dd66b5203ca5ccd.zip |
- Remove setrunqueue and replace it with direct calls to sched_add().
setrunqueue() was mostly empty. The few asserts and thread state
setting were moved to the individual schedulers. sched_add() was
chosen to displace it for naming consistency reasons.
- Remove adjustrunqueue, it was 4 lines of code that was ifdef'd to be
different on all three schedulers where it was only called in one place
each.
- Remove the long ifdef'd out remrunqueue code.
- Remove the now redundant ts_state. Inspect the thread state directly.
- Don't set TSF_* flags from kern_switch.c, we were only doing this to
support a feature in one scheduler.
- Change sched_choose() to return a thread rather than a td_sched. Also,
rely on the schedulers to return the idlethread. This simplifies the
logic in choosethread(). Aside from the run queue links kern_switch.c
mostly does not care about the contents of td_sched.
Discussed with: julian
- Move the idle thread loop into the per scheduler area. ULE wants to
do something different from the other schedulers.
Suggested by: jhb
Tested on: x86/amd64 sched_{4BSD, ULE, CORE}.
Notes
Notes:
svn path=/head/; revision=166188
Diffstat (limited to 'sys/kern/subr_turnstile.c')
-rw-r--r-- | sys/kern/subr_turnstile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index b1e9ee2d4448..1bbdf835e78b 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -875,7 +875,7 @@ turnstile_unpend(struct turnstile *ts, int owner_type) #endif TD_CLR_LOCK(td); MPASS(TD_CAN_RUN(td)); - setrunqueue(td, SRQ_BORING); + sched_add(td, SRQ_BORING); } else { td->td_flags |= TDF_TSNOBLOCK; MPASS(TD_IS_RUNNING(td) || TD_ON_RUNQ(td)); |