summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_4bsd.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2003-04-10 17:35:44 +0000
committerjulian <julian@FreeBSD.org>2003-04-10 17:35:44 +0000
commit6f175a0e20cb55d7b1c3f882e3f1ecbd0503a094 (patch)
treea36a5c6a854637e4e73e7256b937922489d07ddb /sys/kern/sched_4bsd.c
parent2a488098e335f6345e9235190cdc78fa82e9d61f (diff)
downloadFreeBSD-src-6f175a0e20cb55d7b1c3f882e3f1ecbd0503a094.zip
FreeBSD-src-6f175a0e20cb55d7b1c3f882e3f1ecbd0503a094.tar.gz
Move the _oncpu entry from the KSE to the thread.
The entry in the KSE still exists but it's purpose will change a bit when we add the ability to lock a KSE to a cpu.
Diffstat (limited to 'sys/kern/sched_4bsd.c')
-rw-r--r--sys/kern/sched_4bsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index fe6dfd9..3c4f0fe 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -518,7 +518,7 @@ sched_sleep(struct thread *td, u_char prio)
void
sched_switchin(struct thread *td)
{
- td->td_kse->ke_oncpu = PCPU_GET(cpuid);
+ td->td_oncpu = PCPU_GET(cpuid);
}
void
@@ -532,9 +532,9 @@ sched_switchout(struct thread *td)
KASSERT((ke->ke_state == KES_THREAD), ("mi_switch: kse state?"));
- td->td_lastcpu = ke->ke_oncpu;
+ td->td_lastcpu = td->td_oncpu;
td->td_last_kse = ke;
- ke->ke_oncpu = NOCPU;
+ td->td_oncpu = NOCPU;
td->td_flags &= ~TDF_NEEDRESCHED;
/*
* At the last moment, if this thread is still marked RUNNING,
OpenPOWER on IntegriCloud