summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_context.c')
-rw-r--r--sys/kern/kern_context.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_context.c b/sys/kern/kern_context.c
index d1b657f..ffb3f95 100644
--- a/sys/kern/kern_context.c
+++ b/sys/kern/kern_context.c
@@ -44,8 +44,7 @@
* the machine context. The next field is uc_link; we want to
* avoid destroying the link when copying out contexts.
*/
-#define UC_COPY_SIZE (sizeof(sigset_t) + sizeof(mcontext_t))
-
+#define UC_COPY_SIZE offsetof(ucontext_t, uc_link)
#ifndef _SYS_SYSPROTO_H_
struct getcontext_args {
@@ -102,7 +101,7 @@ setcontext(struct thread *td, struct setcontext_args *uap)
}
}
}
- return (ret);
+ return (ret == 0 ? EJUSTRETURN : ret);
}
int
@@ -130,5 +129,5 @@ swapcontext(struct thread *td, struct swapcontext_args *uap)
}
}
}
- return (ret);
+ return (ret == 0 ? EJUSTRETURN : ret);
}
OpenPOWER on IntegriCloud