From owner-cvs-src@FreeBSD.ORG Wed Jul 4 23:18:39 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5993816A400; Wed, 4 Jul 2007 23:18:39 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 484C313C459; Wed, 4 Jul 2007 23:18:39 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l64NIdr4051364; Wed, 4 Jul 2007 23:18:39 GMT (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l64NIdqN051363; Wed, 4 Jul 2007 23:18:39 GMT (envelope-from peter) Message-Id: <200707042318.l64NIdqN051363@repoman.freebsd.org> From: Peter Wemm Date: Wed, 4 Jul 2007 23:18:39 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libc/amd64 SYS.h src/lib/libc/arm SYS.h src/lib/libc/i386 SYS.h src/lib/libc/ia64 SYS.h src/lib/libc/sparc64 SYS.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2007 23:18:39 -0000 peter 2007-07-04 23:18:39 UTC FreeBSD src repository Modified files: lib/libc/amd64 SYS.h lib/libc/arm SYS.h lib/libc/i386 SYS.h lib/libc/ia64 SYS.h lib/libc/sparc64 SYS.h Log: Adjust the syscall stub macros to be consistent in their meaning. In particular: SYSCALL() makes a syscall, with errno handling, and continues execution directly after the macro in the non-error case. RSYSCALL() is just like SYSCALL(), but returns after success. Both SYSCALL(name) and RSYSCALL(name) export "__sys_name" as a strong symbol, with "_name" and "name" as weak aliases. PSEUDO() is just like RSYSCALL(), but skipping the "name" weak alias. It still does "__sys_name" and "_name". Change i386 to add errno handling to PSEUDO. The same for amd64 and sparc64, with appear to have copied the behavior. ia64 was correct (as was alpha). Just remove some apparently unused variants of the macros. (untested!) I believe powerpc is correct. Fix arm to not export "name" from the PSEUDO case. Remove apparently extra unused variants. (untested!) The errno problem manifested on i386/amd64/sparc64 by having "PSEUDO" classified syscalls return without setting errno. eg: "addr = mmap()" could return with "addr" = 22 instead of setting errno to 22 and returning -1. Approved by: re (kensmith) Revision Changes Path 1.29 +9 -2 src/lib/libc/amd64/SYS.h 1.4 +7 -14 src/lib/libc/arm/SYS.h 1.26 +3 -2 src/lib/libc/i386/SYS.h 1.5 +0 -14 src/lib/libc/ia64/SYS.h 1.6 +1 -2 src/lib/libc/sparc64/SYS.h