parlib: Fix context detection in __prep_sighandler()
In commit f3f00eeae350 ("parlib: Fix aggressively-saved FP state for
signals"), we were checking the wrong context. If the uthread was not
saved, its context was in VCPD. That's why we have the ctx variable.
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
diff --git a/user/parlib/signal.c b/user/parlib/signal.c
index e8d2351..4680411 100644
--- a/user/parlib/signal.c
+++ b/user/parlib/signal.c
@@ -163,7 +163,7 @@
uthread->sigstate.data = (struct sigdata*)stack;
/* Parlib aggressively saves the FP state for HW and VM ctxs. SW ctxs
* should not have FP state saved. */
- switch (uthread->u_ctx.type) {
+ switch (ctx->type) {
case ROS_HW_CTX:
case ROS_VM_CTX:
assert(uthread->flags & UTHREAD_FPSAVED);