aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2010-05-03 10:07:53 -0700
committerAurelien Jarno <aurelien@aurel32.net>2010-05-21 16:22:21 +0000
commit9231733a82cfced41edc4d859c1327f7a7ae8a59 (patch)
tree550a6de764f1dcf03cb8081287916953d03fff3f /linux-user/syscall.c
parentfb41a66edd0c7bd652dab14db43426cbbd8514d7 (diff)
alpha-linux-user: Fix getxpid.
Put ppid in the second return register. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 1a5e38184b..e9e61c82cd 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4497,13 +4497,18 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
case TARGET_NR_lseek:
ret = get_errno(lseek(arg1, arg2, arg3));
break;
-#ifdef TARGET_NR_getxpid
+#if defined(TARGET_NR_getxpid) && defined(TARGET_ALPHA)
+ /* Alpha specific */
case TARGET_NR_getxpid:
-#else
- case TARGET_NR_getpid:
+ ((CPUAlphaState *)cpu_env)->ir[IR_A4] = getppid();
+ ret = get_errno(getpid());
+ break;
#endif
+#ifdef TARGET_NR_getpid
+ case TARGET_NR_getpid:
ret = get_errno(getpid());
break;
+#endif
case TARGET_NR_mount:
{
/* need to look at the data field */