From 5ba809ff6655b0d732e334b4ff615047316e6696 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Thu, 31 Jul 2003 05:27:00 +0000 Subject: [PATCH] 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. --- sys/alpha/alpha/machdep.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index eecd53f97d7d..fe9b276e59b8 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -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; } /*