sched: simplify entry-exit path between processes
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
308ba36aab
commit
11bedfe3a8
7 changed files with 24 additions and 20 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue