sched: simplify entry-exit path between processes

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-22 01:09:27 -04:00
commit 11bedfe3a8
7 changed files with 24 additions and 20 deletions

View file

@ -35,6 +35,11 @@ u32 cpu_id()
return tls_get()->cpu_id;
}
void sched_save_state(struct thread *t)
{
t->kstack_ptr = tls_get()->irq_rsp;
}
/* the thread that calls this will be lost, so it should only be called
* on the initial process, and while doing an exec
*/