Use the context flag bits.
This commit is contained in:
parent
20de87e848
commit
a2d9c7ed82
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_machdep.c,v 1.38 1998/09/11 12:50:06 mycroft Exp $ */
|
||||
/* $NetBSD: svr4_machdep.c,v 1.39 1998/09/11 13:22:45 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -138,7 +138,7 @@ svr4_getcontext(p, uc, mask)
|
||||
/*
|
||||
* Set the flags
|
||||
*/
|
||||
uc->uc_flags = SVR4_UC_ALL;
|
||||
uc->uc_flags = SVR4_UC_CPU|SVR4_UC_SIGMASK|SVR4_UC_STACK;
|
||||
}
|
||||
|
||||
|
||||
@ -168,6 +168,7 @@ svr4_setcontext(p, uc)
|
||||
* What to do with floating point stuff?
|
||||
*/
|
||||
|
||||
if (uc->uc_flags & SVR4_UC_CPU) {
|
||||
/* Restore register context. */
|
||||
tf = p->p_md.md_regs;
|
||||
#ifdef VM86
|
||||
@ -206,13 +207,18 @@ svr4_setcontext(p, uc)
|
||||
tf->tf_cs = r[SVR4_X86_CS];
|
||||
tf->tf_ss = r[SVR4_X86_SS];
|
||||
tf->tf_esp = r[SVR4_X86_ESP];
|
||||
}
|
||||
|
||||
if (uc->uc_flags & SVR4_UC_STACK) {
|
||||
/* Restore signal stack. */
|
||||
svr4_to_native_sigaltstack(&uc->uc_stack, &p->p_sigacts->ps_sigstk);
|
||||
}
|
||||
|
||||
if (uc->uc_flags & SVR4_UC_SIGMASK) {
|
||||
/* Restore signal mask. */
|
||||
svr4_to_native_sigset(&uc->uc_sigmask, &mask);
|
||||
(void) sigprocmask1(p, SIG_SETMASK, &mask, 0);
|
||||
}
|
||||
|
||||
return (EJUSTRETURN);
|
||||
}
|
||||
@ -366,6 +372,7 @@ svr4_sendsig(catcher, sig, mask, code)
|
||||
frame.sf_sip = &fp->sf_si;
|
||||
frame.sf_ucp = &fp->sf_uc;
|
||||
frame.sf_handler = catcher;
|
||||
|
||||
#ifdef DEBUG_SVR4
|
||||
printf("sig = %d, sip %p, ucp = %p, handler = %p\n",
|
||||
frame.sf_signum, frame.sf_sip, frame.sf_ucp, frame.sf_handler);
|
||||
|
Loading…
Reference in New Issue
Block a user