aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2002-04-10 20:08:07 +0000
committerAlan Cox <alc@FreeBSD.org>2002-04-10 20:08:07 +0000
commiteac84263c4af609412520f149227432da935770b (patch)
treefc7ff2304f28ef7dd11759664f231b0524eec51b /sys
parent102b06f844253e92780350d2edba3ad1d9e21123 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/machdep.c14
-rw-r--r--sys/i386/i386/machdep.c14
2 files changed, 18 insertions, 10 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index d54d3d78143b..a3ad87ba6d3d 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -528,6 +528,8 @@ sendsig(catcher, sig, mask, code)
* context left by sendsig. Check carefully to
* make sure that the user has not modified the
* state to gain improper privileges.
+ *
+ * MPSAFE
*/
int
osigreturn(td, uap)
@@ -624,6 +626,10 @@ osigreturn(td, uap)
regs->tf_cs = scp->sc_cs;
regs->tf_ss = scp->sc_ss;
regs->tf_isp = scp->sc_isp;
+ regs->tf_ebp = scp->sc_fp;
+ regs->tf_esp = scp->sc_sp;
+ regs->tf_eip = scp->sc_pc;
+ regs->tf_eflags = eflags;
PROC_LOCK(p);
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
@@ -632,21 +638,19 @@ osigreturn(td, uap)
else
p->p_sigstk.ss_flags &= ~SS_ONSTACK;
#endif
-
SIGSETOLD(p->p_sigmask, scp->sc_mask);
SIG_CANTMASK(p->p_sigmask);
signotify(p);
PROC_UNLOCK(p);
- regs->tf_ebp = scp->sc_fp;
- regs->tf_esp = scp->sc_sp;
- regs->tf_eip = scp->sc_pc;
- regs->tf_eflags = eflags;
return (EJUSTRETURN);
#else /* !COMPAT_43 */
return (ENOSYS);
#endif /* COMPAT_43 */
}
+/*
+ * MPSAFE
+ */
int
sigreturn(td, uap)
struct thread *td;
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index d54d3d78143b..a3ad87ba6d3d 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -528,6 +528,8 @@ sendsig(catcher, sig, mask, code)
* context left by sendsig. Check carefully to
* make sure that the user has not modified the
* state to gain improper privileges.
+ *
+ * MPSAFE
*/
int
osigreturn(td, uap)
@@ -624,6 +626,10 @@ osigreturn(td, uap)
regs->tf_cs = scp->sc_cs;
regs->tf_ss = scp->sc_ss;
regs->tf_isp = scp->sc_isp;
+ regs->tf_ebp = scp->sc_fp;
+ regs->tf_esp = scp->sc_sp;
+ regs->tf_eip = scp->sc_pc;
+ regs->tf_eflags = eflags;
PROC_LOCK(p);
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
@@ -632,21 +638,19 @@ osigreturn(td, uap)
else
p->p_sigstk.ss_flags &= ~SS_ONSTACK;
#endif
-
SIGSETOLD(p->p_sigmask, scp->sc_mask);
SIG_CANTMASK(p->p_sigmask);
signotify(p);
PROC_UNLOCK(p);
- regs->tf_ebp = scp->sc_fp;
- regs->tf_esp = scp->sc_sp;
- regs->tf_eip = scp->sc_pc;
- regs->tf_eflags = eflags;
return (EJUSTRETURN);
#else /* !COMPAT_43 */
return (ENOSYS);
#endif /* COMPAT_43 */
}
+/*
+ * MPSAFE
+ */
int
sigreturn(td, uap)
struct thread *td;