From owner-cvs-all@FreeBSD.ORG Thu Apr 24 18:50:31 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5408C37B401; Thu, 24 Apr 2003 18:50:31 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E15F243FF5; Thu, 24 Apr 2003 18:50:30 -0700 (PDT) (envelope-from deischen@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3P1oU0U059594; Thu, 24 Apr 2003 18:50:30 -0700 (PDT) (envelope-from deischen@repoman.freebsd.org) Received: (from deischen@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3P1oU3k059591; Thu, 24 Apr 2003 18:50:30 -0700 (PDT) Message-Id: <200304250150.h3P1oU3k059591@repoman.freebsd.org> From: Daniel Eischen Date: Thu, 24 Apr 2003 18:50:30 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/alpha/alpha machdep.c src/sys/i386/i386 machdep.c src/sys/ia64/ia64 machdep.c src/sys/kern kern_context.c kern_thread.c src/sys/pc98/i386 machdep.c src/sys/powerpc/powerpc machdep.c src/sys/sparc64/sparc64 machdep.c src/sys/sys ucontext.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2003 01:50:31 -0000 deischen 2003/04/24 18:50:30 PDT FreeBSD src repository Modified files: sys/alpha/alpha machdep.c sys/i386/i386 machdep.c sys/ia64/ia64 machdep.c sys/kern kern_context.c kern_thread.c sys/pc98/i386 machdep.c sys/powerpc/powerpc machdep.c sys/sparc64/sparc64 machdep.c sys/sys ucontext.h Log: 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) Revision Changes Path 1.201 +7 -3 src/sys/alpha/alpha/machdep.c 1.563 +8 -3 src/sys/i386/i386/machdep.c 1.129 +1 -1 src/sys/ia64/ia64/machdep.c 1.5 +2 -2 src/sys/kern/kern_context.c 1.124 +1 -15 src/sys/kern/kern_thread.c 1.316 +8 -3 src/sys/pc98/i386/machdep.c 1.53 +1 -1 src/sys/powerpc/powerpc/machdep.c 1.90 +5 -1 src/sys/sparc64/sparc64/machdep.c 1.10 +1 -1 src/sys/sys/ucontext.h