diff options
author | Marius Strobl <marius@FreeBSD.org> | 2013-07-12 14:24:52 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2013-07-12 14:24:52 +0000 |
commit | 85338755c1bcc98b2fdaeba1d666c038c7443875 (patch) | |
tree | d968dcbe17cbe1fca5407a91b1192b59a429fcbd /sys/sparc64 | |
parent | 4825b1e0981bf7fe0b9cf4122a83d518064e29a6 (diff) | |
download | src-85338755c1bcc98b2fdaeba1d666c038c7443875.tar.gz src-85338755c1bcc98b2fdaeba1d666c038c7443875.zip |
Prefix the alias macros for members of struct __mcontext with an underscore
in order to avoid a clash in the net80211 code.
Notes
Notes:
svn path=/head/; revision=253266
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/include/ucontext.h | 22 | ||||
-rw-r--r-- | sys/sparc64/sparc64/machdep.c | 40 |
2 files changed, 31 insertions, 31 deletions
diff --git a/sys/sparc64/include/ucontext.h b/sys/sparc64/include/ucontext.h index c05ec26a9053..1c907fef9e6d 100644 --- a/sys/sparc64/include/ucontext.h +++ b/sys/sparc64/include/ucontext.h @@ -6,7 +6,7 @@ * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer + * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the @@ -42,16 +42,16 @@ struct __mcontext { typedef struct __mcontext mcontext_t; -#define mc_flags mc_global[0] -#define mc_sp mc_out[6] -#define mc_fprs mc_local[0] -#define mc_fsr mc_local[1] -#define mc_gsr mc_local[2] -#define mc_tnpc mc_in[0] -#define mc_tpc mc_in[1] -#define mc_tstate mc_in[2] -#define mc_y mc_in[4] -#define mc_wstate mc_in[5] +#define _mc_flags mc_global[0] +#define _mc_sp mc_out[6] +#define _mc_fprs mc_local[0] +#define _mc_fsr mc_local[1] +#define _mc_gsr mc_local[2] +#define _mc_tnpc mc_in[0] +#define _mc_tpc mc_in[1] +#define _mc_tstate mc_in[2] +#define _mc_y mc_in[4] +#define _mc_wstate mc_in[5] #define _MC_VERSION_SHIFT 0 #define _MC_VERSION_BITS 32 diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index 00ae00fb7b30..de645da0b1ed 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -736,7 +736,7 @@ sys_sigreturn(struct thread *td, struct sigreturn_args *uap) kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); CTR4(KTR_SIG, "sigreturn: return td=%p pc=%#lx sp=%#lx tstate=%#lx", - td, mc->mc_tpc, mc->mc_sp, mc->mc_tstate); + td, mc->_mc_tpc, mc->_mc_sp, mc->_mc_tstate); return (EJUSTRETURN); } @@ -769,7 +769,7 @@ get_mcontext(struct thread *td, mcontext_t *mc, int flags) * Note that we skip %g7 which is used as the userland TLS register * and %wstate. */ - mc->mc_flags = _MC_VERSION; + mc->_mc_flags = _MC_VERSION; mc->mc_global[1] = tf->tf_global[1]; mc->mc_global[2] = tf->tf_global[2]; mc->mc_global[3] = tf->tf_global[3]; @@ -789,13 +789,13 @@ get_mcontext(struct thread *td, mcontext_t *mc, int flags) mc->mc_out[5] = tf->tf_out[5]; mc->mc_out[6] = tf->tf_out[6]; mc->mc_out[7] = tf->tf_out[7]; - mc->mc_fprs = tf->tf_fprs; - mc->mc_fsr = tf->tf_fsr; - mc->mc_gsr = tf->tf_gsr; - mc->mc_tnpc = tf->tf_tnpc; - mc->mc_tpc = tf->tf_tpc; - mc->mc_tstate = tf->tf_tstate; - mc->mc_y = tf->tf_y; + mc->_mc_fprs = tf->tf_fprs; + mc->_mc_fsr = tf->tf_fsr; + mc->_mc_gsr = tf->tf_gsr; + mc->_mc_tnpc = tf->tf_tnpc; + mc->_mc_tpc = tf->tf_tpc; + mc->_mc_tstate = tf->tf_tstate; + mc->_mc_y = tf->tf_y; critical_enter(); if ((tf->tf_fprs & FPRS_FEF) != 0) { savefpctx(pcb->pcb_ufp); @@ -804,7 +804,7 @@ get_mcontext(struct thread *td, mcontext_t *mc, int flags) } if ((pcb->pcb_flags & PCB_FEF) != 0) { bcopy(pcb->pcb_ufp, mc->mc_fp, sizeof(mc->mc_fp)); - mc->mc_fprs |= FPRS_FEF; + mc->_mc_fprs |= FPRS_FEF; } critical_exit(); return (0); @@ -816,8 +816,8 @@ set_mcontext(struct thread *td, const mcontext_t *mc) struct trapframe *tf; struct pcb *pcb; - if (!TSTATE_SECURE(mc->mc_tstate) || - (mc->mc_flags & ((1L << _MC_VERSION_BITS) - 1)) != _MC_VERSION) + if (!TSTATE_SECURE(mc->_mc_tstate) || + (mc->_mc_flags & ((1L << _MC_VERSION_BITS) - 1)) != _MC_VERSION) return (EINVAL); tf = td->td_frame; pcb = td->td_pcb; @@ -843,14 +843,14 @@ set_mcontext(struct thread *td, const mcontext_t *mc) tf->tf_out[5] = mc->mc_out[5]; tf->tf_out[6] = mc->mc_out[6]; tf->tf_out[7] = mc->mc_out[7]; - tf->tf_fprs = mc->mc_fprs; - tf->tf_fsr = mc->mc_fsr; - tf->tf_gsr = mc->mc_gsr; - tf->tf_tnpc = mc->mc_tnpc; - tf->tf_tpc = mc->mc_tpc; - tf->tf_tstate = mc->mc_tstate; - tf->tf_y = mc->mc_y; - if ((mc->mc_fprs & FPRS_FEF) != 0) { + tf->tf_fprs = mc->_mc_fprs; + tf->tf_fsr = mc->_mc_fsr; + tf->tf_gsr = mc->_mc_gsr; + tf->tf_tnpc = mc->_mc_tnpc; + tf->tf_tpc = mc->_mc_tpc; + tf->tf_tstate = mc->_mc_tstate; + tf->tf_y = mc->_mc_y; + if ((mc->_mc_fprs & FPRS_FEF) != 0) { tf->tf_fprs = 0; bcopy(mc->mc_fp, pcb->pcb_ufp, sizeof(pcb->pcb_ufp)); pcb->pcb_flags |= PCB_FEF; |