aboutsummaryrefslogtreecommitdiff
path: root/sys/arch/amd64/amd64
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-08-12 22:00:40 -0400
committerIan Moffett <ian@osmora.org>2024-08-12 22:00:40 -0400
commit30cb24fbc5700771208dddb9e5f42d0ae5d7ff38 (patch)
tree265f5f873200e8df462792cca88a4973e12093bf /sys/arch/amd64/amd64
parentb03d906f80dbafea77669b276c36843759af5d3e (diff)
kernel/amd64: proc: Set curtd upon thread kick
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64/amd64')
-rw-r--r--sys/arch/amd64/amd64/proc_machdep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/arch/amd64/amd64/proc_machdep.c b/sys/arch/amd64/amd64/proc_machdep.c
index ba65af4..cb337fb 100644
--- a/sys/arch/amd64/amd64/proc_machdep.c
+++ b/sys/arch/amd64/amd64/proc_machdep.c
@@ -122,8 +122,12 @@ void
md_td_kick(struct proc *td)
{
struct trapframe *tfp;
+ struct cpu_info *ci;
tfp = &td->tf;
+ ci = this_cpu();
+ ci->curtd = td;
+
__ASMV(
"push %0\n"
"push %1\n"