aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/sparc64/machdep.c
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2003-11-09 20:31:04 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2003-11-09 20:31:04 +0000
commitfcaa2925a9ae773d496f3bbef0a404a1d75d6910 (patch)
treed88a1cc1b286d672e6999651ad44bf13ca883e02 /sys/sparc64/sparc64/machdep.c
parent116f7a3ddb382f6472c5600d22fa0edc23ddf0ab (diff)
downloadsrc-fcaa2925a9ae773d496f3bbef0a404a1d75d6910.tar.gz
src-fcaa2925a9ae773d496f3bbef0a404a1d75d6910.zip
Change the clear_ret argument of get_mcontext() to be a flags argument.
Since all callers either passed 0 or 1 for clear_ret, define bit 0 in the flags for use as clear_ret. Reserve bits 1, 2 and 3 for use by MI code for possible (but unlikely) future use. The remaining bits are for use by MD code. This change is triggered by a need on ia64 to have another knob for get_mcontext().
Notes
Notes: svn path=/head/; revision=122364
Diffstat (limited to 'sys/sparc64/sparc64/machdep.c')
-rw-r--r--sys/sparc64/sparc64/machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 3621fef604cb..a09963880b7d 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -564,7 +564,7 @@ freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap)
#endif
int
-get_mcontext(struct thread *td, mcontext_t *mc, int clear_ret)
+get_mcontext(struct thread *td, mcontext_t *mc, int flags)
{
struct trapframe *tf;
struct pcb *pcb;
@@ -572,7 +572,7 @@ get_mcontext(struct thread *td, mcontext_t *mc, int clear_ret)
tf = td->td_frame;
pcb = td->td_pcb;
bcopy(tf, mc, sizeof(*tf));
- if (clear_ret != 0) {
+ if (flags & GET_MC_CLEAR_RET) {
mc->mc_out[0] = 0;
mc->mc_out[1] = 0;
}