summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/sparc/locore.s2
-rw-r--r--sys/arch/sparc/sparc/machdep.c15
2 files changed, 7 insertions, 10 deletions
diff --git a/sys/arch/sparc/sparc/locore.s b/sys/arch/sparc/sparc/locore.s
index be852c9725e..54791a51b42 100644
--- a/sys/arch/sparc/sparc/locore.s
+++ b/sys/arch/sparc/sparc/locore.s
@@ -3711,7 +3711,7 @@ noplab: nop
* When this code is run, the stack looks like:
* [%sp] 64 bytes to which registers can be dumped
* [%sp + 64] signal number (goes in %o0)
- * [%sp + 64 + 4] signal code (goes in %o1)
+ * [%sp + 64 + 4] siginfo_t pointer (goes in %o1)
* [%sp + 64 + 8] placeholder
* [%sp + 64 + 12] argument for %o3, currently unsupported (always 0)
* [%sp + 64 + 16] first word of saved state (sigcontext)
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 9aa15c27dec..f0054117fd9 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -420,16 +420,13 @@ int sigpid = 0;
struct sigframe {
int sf_signo; /* signal number */
- int sf_code; /* code */
+ siginfo_t *sf_sip; /* points to siginfo_t */
#ifdef COMPAT_SUNOS
struct sigcontext *sf_scp; /* points to user addr of sigcontext */
#else
int sf_xxx; /* placeholder */
#endif
- union {
- caddr_t sfu_addr; /* SunOS compat */
- siginfo_t *sfu_sip; /* native */
- } sf_u;
+ caddr_t sf_addr; /* SunOS compat */
struct sigcontext sf_sc; /* actual sigcontext */
siginfo_t sf_si;
};
@@ -509,12 +506,12 @@ sendsig(catcher, sig, mask, code, type, val)
* directly in user space....
*/
sf.sf_signo = sig;
- sf.sf_code = code;
- sf.sf_u.sfu_sip = NULL;
+ sf.sf_sip = NULL;
#ifdef COMPAT_SUNOS
if (p->p_emul == &emul_sunos) {
+ sf.sf_sip = (void *)code; /* SunOS has "int code" */
sf.sf_scp = &fp->sf_sc;
- sf.sf_u.sfu_addr = val.sival_ptr;
+ sf.sf_addr = val.sival_ptr;
}
#endif
@@ -531,7 +528,7 @@ sendsig(catcher, sig, mask, code, type, val)
sf.sf_sc.sc_o0 = tf->tf_out[0];
if (psp->ps_siginfo & sigmask(sig)) {
- sf.sf_u.sfu_sip = &fp->sf_si;
+ sf.sf_sip = &fp->sf_si;
initsiginfo(&sf.sf_si, sig, code, type, val);
}