summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-07-31 05:27:00 +0000
committermarcel <marcel@FreeBSD.org>2003-07-31 05:27:00 +0000
commitf947353bea37caaddde735ba2aba63427901428d (patch)
tree2599b470273ec9e85ae19314e8f3da8f4a2db87a /sys/alpha
parent7246ed5007e4a725498aaee398eaf6dcd9f38c86 (diff)
downloadFreeBSD-src-f947353bea37caaddde735ba2aba63427901428d.zip
FreeBSD-src-f947353bea37caaddde735ba2aba63427901428d.tar.gz
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.
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/machdep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c
index eecd53f..fe9b276 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;
}
/*
OpenPOWER on IntegriCloud