Message ID | 20180610030220.3777-20-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2584504lji; Sat, 9 Jun 2018 20:21:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKUCUFcTgeJu9/Pkz+eYX/g3Gl3/nYFhn8g7CGQP24suBwtFMlAYQLp2sCTUZG80htYKmZ2 X-Received: by 2002:a0c:e2cd:: with SMTP id t13-v6mr10774158qvl.47.1528600919031; Sat, 09 Jun 2018 20:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528600919; cv=none; d=google.com; s=arc-20160816; b=QPDKz/XIwTDsfOCh4ryYCZDRVKjqoopDNP91zP7jRxJd95rexaLMMgfKHBKfCNh6+D sOHaDaa2E8H3CqgYbNU//4JapIfw1CY9Xsj1YitgMxpuxd1EwfxJRt9OofX8LSQZ+ijH S+HyJnQ8JJVDfpP2nMDwLfiGY9/mRYNLhjK6hQkw75eMjcHa95jVyOCHEfyg6D2x53kv uVkd6WFwC4jyxPrq27KPvc9v711uiKt+oKbvlgsFvyXPUh4K7aEQB3OCH1rfrl/FtuVX 3ZvlZHd4r1ZdpXJw2F6BNkg2P7ydY2Fl3VuDqsR2xvXnzlu2lTPkQrPPrqIkQKoaDK6q d+Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=0LBnHctWjTDpxuK0VTUuP0XoJOgCp3jsCOJM7Zsg3y8=; b=dd9t6Ix/QYtVusJ+5Rp168JxuL5n1DSPOni1i9F5SHG8KS/tuFxGyu12pNIpHEiyqo Y6gEGzrdoyI0TMmguH2k1K+er0HJ9odYeNCLLzIPUuTMggUHl43NM3OtxITCy7dk8R0I nGDzgmiHsfmVbAuBpA/nlsqlbZYMU4W+RfUqs0ZP+MO5XDuF9lDQWA7zB2FUomDcEMbh m6EN+759pRpCR2LrLEzLHvh1r+WygDJng/+WSxSkpicce/zeVnYbEYMgVpI7XrReGGVb s5jr11fNjN0Y2Z0Lb4wFUEHXb0AkEf9BKqNUGKAQUWyk2/fx66U5vDdBf4+7f0S6x8oL pv6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hcwAKLO6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y26-v6si8915830qtf.222.2018.06.09.20.21.58 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 09 Jun 2018 20:21:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hcwAKLO6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fRqvW-0001I9-DA for patch@linaro.org; Sat, 09 Jun 2018 23:21:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqdI-000229-87 for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:03:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqdH-0003Jc-8c for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:03:08 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:41358) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqdH-0003JP-3N for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:03:07 -0400 Received: by mail-pf0-x241.google.com with SMTP id a11-v6so8485301pff.8 for <qemu-devel@nongnu.org>; Sat, 09 Jun 2018 20:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0LBnHctWjTDpxuK0VTUuP0XoJOgCp3jsCOJM7Zsg3y8=; b=hcwAKLO6h2aMb07chaORM78lmhDBSbOGWG+fMmm9p73h/4wXtKYH9BSDFfi+QihqMp wDZNLLXBmXEVxf+hbkex5Ge4OJJ2voPQWLBzR9t17JZ7T1xDKeoa2sMBUd8Su8zzPUXk g65Jev+RA1zmKJP/T21EIRYkYsIo+YQOJxiNg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0LBnHctWjTDpxuK0VTUuP0XoJOgCp3jsCOJM7Zsg3y8=; b=jYdkXYGyBUN1+E/Gu77XC9JLt8umt/rgDQEj71Ii/tvlTwDhUaTnofSqs8YnAGeRgV TKJLefb7Uw+hk2Y9tKHH5LjIfeiHC4MZfQb/10K56q4WYu0E7bhCXtTsuJgmlTAA5Vhh foZ4KF4UAPypaBlCfA5ay19LloCeH3gtoAHO0VPD6A+RS2cG2dFo3rFlYHY/WF6fGg7s 8B0QtBPxcXaxeMH6IJX81/9nO9S7GIboB1oReUjzdNvSDQLrcbWRQMtKuoHJhBYExWOd Iz/Z4Sptu7KZkQwVtp5vP3q558yzcKc281qu33x9uW8sCkx4NPVL70U8Kac9jkygKB/Y /7bA== X-Gm-Message-State: APt69E2l2ev7TAFB904mWyBe8pRPaBttVfN7ZP4ltSA6TsP+thUp/KwC RU0XnLusvZcmkpOqGDtCcN0gx6cheHo= X-Received: by 2002:a65:6356:: with SMTP id p22-v6mr10452538pgv.20.1528599785840; Sat, 09 Jun 2018 20:03:05 -0700 (PDT) Received: from cloudburst.twiddle.net (rrcs-173-198-77-219.west.biz.rr.com. [173.198.77.219]) by smtp.gmail.com with ESMTPSA id y17-v6sm31712718pfe.33.2018.06.09.20.03.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 20:03:05 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Sat, 9 Jun 2018 17:00:51 -1000 Message-Id: <20180610030220.3777-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180610030220.3777-1-richard.henderson@linaro.org> References: <20180610030220.3777-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PATCH v2 019/108] linux-user: Split out getpid, getxpid, lseek X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
linux-user: Split do_syscall
|
expand
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d32034ce38..3d3983a504 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8080,6 +8080,21 @@ IMPL(fork) } #endif +#ifdef TARGET_NR_getpid +IMPL(getpid) +{ + return get_errno(getpid()); +} +#endif + +#if defined(TARGET_NR_getxpid) && defined(TARGET_ALPHA) +IMPL(getxpid) +{ + ((CPUAlphaState *)cpu_env)->ir[IR_A4] = getppid(); + return get_errno(getpid()); +} +#endif + #ifdef TARGET_NR_link IMPL(link) { @@ -8110,6 +8125,11 @@ IMPL(linkat) return ret; } +IMPL(lseek) +{ + return get_errno(lseek(arg1, arg2, arg3)); +} + #ifdef TARGET_NR_mknod IMPL(mknod) { @@ -8396,18 +8416,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1, void *p; switch(num) { - case TARGET_NR_lseek: - return get_errno(lseek(arg1, arg2, arg3)); -#if defined(TARGET_NR_getxpid) && defined(TARGET_ALPHA) - /* Alpha specific */ - case TARGET_NR_getxpid: - ((CPUAlphaState *)cpu_env)->ir[IR_A4] = getppid(); - return get_errno(getpid()); -#endif -#ifdef TARGET_NR_getpid - case TARGET_NR_getpid: - return get_errno(getpid()); -#endif case TARGET_NR_mount: { /* need to look at the data field */ @@ -12546,10 +12554,17 @@ static impl_fn *syscall_table(unsigned num) #ifdef TARGET_NR_fork SYSCALL(fork); #endif +#ifdef TARGET_NR_getpid + SYSCALL(getpid); +#endif +#if defined(TARGET_NR_getxpid) && defined(TARGET_ALPHA) + SYSCALL(getxpid); +#endif #ifdef TARGET_NR_link SYSCALL(link); #endif SYSCALL(linkat); + SYSCALL(lseek); #ifdef TARGET_NR_mknod SYSCALL(mknod); #endif
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/syscall.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) -- 2.17.1