In set_mcontext(), store the (user) stack pointer and the thread
pointer in the PCB of the corresponding thread if it's not the current thread. This is needed for thr_create() to setup the newly created thread from the context provided by the application. This commit finalizes supporting libthr.
This commit is contained in:
parent
b053bc8407
commit
5ba809ff66
@ -2074,6 +2074,9 @@ set_mcontext(struct thread *td, const mcontext_t *mcp)
|
||||
if (td == curthread) {
|
||||
alpha_pal_wrusp(mcp->mc_regs[FRAME_SP]);
|
||||
alpha_pal_wrunique(mcp->mc_thrptr);
|
||||
} else {
|
||||
td->td_pcb->pcb_hw.apcb_usp = mcp->mc_regs[FRAME_SP];
|
||||
td->td_pcb->pcb_hw.apcb_unique = mcp->mc_thrptr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user