From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L12LI-0007jq-Rz for qemu-devel@nongnu.org; Fri, 14 Nov 2008 12:20:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L12LH-0007hM-TD for qemu-devel@nongnu.org; Fri, 14 Nov 2008 12:20:24 -0500 Received: from [199.232.76.173] (port=49853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L12LH-0007h8-Ke for qemu-devel@nongnu.org; Fri, 14 Nov 2008 12:20:23 -0500 Received: from savannah.gnu.org ([199.232.41.3]:43237 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L12LI-0006FP-6U for qemu-devel@nongnu.org; Fri, 14 Nov 2008 12:20:24 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1L12LE-0001ch-4M for qemu-devel@nongnu.org; Fri, 14 Nov 2008 17:20:20 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1L12LC-0001cT-44 for qemu-devel@nongnu.org; Fri, 14 Nov 2008 17:20:18 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Fri, 14 Nov 2008 17:20:18 +0000 Subject: [Qemu-devel] [5722] target-alpha: implement getxuid and getxgid syscalls Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5722 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5722 Author: aurel32 Date: 2008-11-14 17:20:15 +0000 (Fri, 14 Nov 2008) Log Message: ----------- target-alpha: implement getxuid and getxgid syscalls This patch implemented the setxuid and setxgid syscalls for Alpha. These syscalls return two values, both uid/euid and gid/egid. In addition to returning the first value in $v0, the additional value is returned in the $a4 register. The syscalls are used instead of the separate syscalls for those values used on other architectures (this is probably because Alpha Linux started out syscall compatible with DEC/OSF/Tru64). With this patch, the perlbmk benchmarks from Spec2000 run properly. (Vince Weaver) Modified Paths: -------------- trunk/linux-user/syscall.c Modified: trunk/linux-user/syscall.c =================================================================== --- trunk/linux-user/syscall.c 2008-11-14 17:05:54 UTC (rev 5721) +++ trunk/linux-user/syscall.c 2008-11-14 17:20:15 UTC (rev 5722) @@ -5533,6 +5533,30 @@ ret = get_errno(getuid()); break; #endif + +#if defined(TARGET_NR_getxuid) && defined(TARGET_ALPHA) + /* Alpha specific */ + case TARGET_NR_getxuid: + { + uid_t euid; + euid=geteuid(); + ((CPUAlphaState *)cpu_env)->ir[IR_A4]=euid; + } + ret = get_errno(getuid()); + break; +#endif +#if defined(TARGET_NR_getxgid) && defined(TARGET_ALPHA) + /* Alpha specific */ + case TARGET_NR_getxgid: + { + uid_t egid; + egid=getegid(); + ((CPUAlphaState *)cpu_env)->ir[IR_A4]=egid; + } + ret = get_errno(getgid()); + break; +#endif + #ifdef TARGET_NR_getgid32 case TARGET_NR_getgid32: ret = get_errno(getgid());