diff options
author | jhb <jhb@FreeBSD.org> | 2004-07-02 19:09:50 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-07-02 19:09:50 +0000 |
commit | 1b16b181d12075ffc084f2a593e16fe3dd8f6f6d (patch) | |
tree | e89f55b0c72410220a98331e61987c812e0316dd /sys/kern/kern_intr.c | |
parent | 4b39413aeb9e3e3ff1341b98477edddee8807db5 (diff) | |
download | FreeBSD-src-1b16b181d12075ffc084f2a593e16fe3dd8f6f6d.zip FreeBSD-src-1b16b181d12075ffc084f2a593e16fe3dd8f6f6d.tar.gz |
- Change mi_switch() and sched_switch() to accept an optional thread to
switch to. If a non-NULL thread pointer is passed in, then the CPU will
switch to that thread directly rather than calling choosethread() to pick
a thread to choose to.
- Make sched_switch() aware of idle threads and know to do
TD_SET_CAN_RUN() instead of sticking them on the run queue rather than
requiring all callers of mi_switch() to know to do this if they can be
called from an idlethread.
- Move constants for arguments to mi_switch() and thread_single() out of
the middle of the function prototypes and up above into their own
section.
Diffstat (limited to 'sys/kern/kern_intr.c')
-rw-r--r-- | sys/kern/kern_intr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 920b9da..d11e9d2 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -416,7 +416,7 @@ ithread_schedule(struct ithd *ithread, int do_switch) ("ithread_schedule: Bad state for curthread.")); if (ctd->td_flags & TDF_IDLETD) ctd->td_state = TDS_CAN_RUN; /* XXXKSE */ - mi_switch(SW_INVOL); + mi_switch(SW_INVOL, NULL); } else { curthread->td_flags |= TDF_NEEDRESCHED; } @@ -618,7 +618,7 @@ restart: if (!ithd->it_need) { TD_SET_IWAIT(td); CTR2(KTR_INTR, "%s: pid %d: done", __func__, p->p_pid); - mi_switch(SW_VOL); + mi_switch(SW_VOL, NULL); CTR2(KTR_INTR, "%s: pid %d: resumed", __func__, p->p_pid); } mtx_unlock_spin(&sched_lock); |