mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-21 17:25:09 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118245
|
@ -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 a new issue