From 3d51b3a2809784a3fd4e35c34422c2f82d8fd818 Mon Sep 17 00:00:00 2001 From: deischen Date: Fri, 25 Apr 2003 01:50:30 +0000 Subject: Add an argument to get_mcontext() which specified whether the syscall return values should be cleared. The system calls getcontext() and swapcontext() want to return 0 on success but these contexts can be switched to at a later time so the return values need to be cleared in the saved register sets. Other callers of get_mcontext() would normally want the context without clearing the return values. Remove the i386-specific context saving from the KSE code. get_mcontext() is not i386-specific any more. Fix a bad pointer in the alpha get_mcontext() code. The context was being bcopy()'d from &td->tf_frame, but tf_frame is itself a pointer, so the thread was being copied instead. Spotted by jake. Glanced at by: jake Reviewed by: bde (months ago) --- sys/powerpc/aim/machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/powerpc/aim/machdep.c') diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index 39fcc49..81fb604 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -562,7 +562,7 @@ freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) #endif int -get_mcontext(struct thread *td, mcontext_t *mcp) +get_mcontext(struct thread *td, mcontext_t *mcp, int clear_ret) { return (ENOSYS); -- cgit v1.1