summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-11-09 20:31:04 +0000
committermarcel <marcel@FreeBSD.org>2003-11-09 20:31:04 +0000
commit21340f30b3b095c29e40dbb7a9789b599a246f7e (patch)
treed88a1cc1b286d672e6999651ad44bf13ca883e02 /sys/ia64
parent87bc402cf2b4799b9d90bb4c6f45d841e78d8881 (diff)
downloadFreeBSD-src-21340f30b3b095c29e40dbb7a9789b599a246f7e.zip
FreeBSD-src-21340f30b3b095c29e40dbb7a9789b599a246f7e.tar.gz
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().
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index fb4d5bf..25630c8 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -1073,7 +1073,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 _special s;
struct trapframe *tf;
@@ -1108,7 +1108,7 @@ get_mcontext(struct thread *td, mcontext_t *mc, int clear_ret)
* return register, just like gr8-gr10.
*/
mc->mc_flags |= _MC_FLAGS_RETURN_VALID;
- if (!clear_ret) {
+ if ((flags & GET_MC_CLEAR_RET) == 0) {
mc->mc_scratch.gr8 = tf->tf_scratch.gr8;
mc->mc_scratch.gr9 = tf->tf_scratch.gr9;
mc->mc_scratch.gr10 = tf->tf_scratch.gr10;
OpenPOWER on IntegriCloud