Message ID | 20190519203726.20729-67-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4808886ili; Sun, 19 May 2019 14:23:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxI4Z0Z254Q/eMqO+fynBiiGySU09MQE3W4PZrjmDZhfdPvhW8k+6Dct9mXPLWSl4KqJChi X-Received: by 2002:a17:906:1545:: with SMTP id c5mr55816835ejd.135.1558300992854; Sun, 19 May 2019 14:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558300992; cv=none; d=google.com; s=arc-20160816; b=U/yKCxzCLytJELEp8EyPEqzovGtMpQpyi3PQ2v50svnbC6DmLU7NCtb6iOFqIpoY6F rvHH3F5MuldhNr3/t/LSW709ZsQuoe71TT/fgKPgsPPxCuWv/i5ucxOUsnmBh8/pGtCW KzIA6O5846bDFadrK2wCA+iFl9KX14tkMMIoglH26/1VuBa3bA0E3cQF8+GydBfzdyYP ZweBy/YDywLblr1haxrh/SoJ3LqxKmRiIjO8gFyMn0DJGVX8Qoh86z19584FuT8vWqBl WUT2KWUiSvIMGTLGu3QjiiXBRkgXCgBL+TnZNE1UZdhleSl9qhSoPHJt+aUbQQR7Msc+ iWZA== 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; bh=bykKUGCflVir5L1X693JNtqoexPRstJK20ieV2db78g=; b=WHxmLgkf+WFAPIR6BwgZrghvKZPWJX4/makbUEEnobXkldwRjhDEfVHSpiDY+SnshZ 0rP1qlqUgVRgMgoenbkBodmCNJajQAoGrFKWALvoNDc56duRN72C9liuzcYCrqQMM848 FtW2241+FpnRYIZ3STgixuoD0PV29May3Q8fBP/ydaEmPmkYLg892ZZcwEHWzgT5LrMr tPi2/zjuusYccVGPQOQ789RFtE09afm2ilb8EpqChP6OKbBbpP77MX12NgqYd8T1Aw9y 5qm9gK8rXj5vbXJYFzf9vsSafdG5KAqOGnnbd/dHXxgzh5pt1aggYvDsbl+u/jCIwZMi 6r/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DiXkK1HU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id h15si4168841eda.399.2019.05.19.14.23.12 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 19 May 2019 14:23:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DiXkK1HU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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 ([127.0.0.1]:53781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1hSTGx-0000M5-Nc for patch@linaro.org; Sun, 19 May 2019 17:23:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hSSa5-00041U-5E for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hSSa4-0004zA-7B for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:53 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:46929) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hSSa4-0004yQ-1X for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:52 -0400 Received: by mail-pl1-x641.google.com with SMTP id r18so5699095pls.13 for <qemu-devel@nongnu.org>; Sun, 19 May 2019 13:38:51 -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=bykKUGCflVir5L1X693JNtqoexPRstJK20ieV2db78g=; b=DiXkK1HULs1qZQr6XHCdONJlFdr4Z6wp5i2+/yVPGm4ltSd06UxUbj88jhjOY5yS6r 6b1sM7jbMixUzHUW+5NthhDJvTSJF03KlzWTOlbK5InvaNLIA1fkm+yjQ7/gQeSL0fML 8h+ErZgLWozYoGlaBs6ASRdFSZ6btkE6gs1zJM80kehykFEi+tug1yeRWaU7yv+xflof B6ubZwuKSNswz4iTYBcGz7phNibpZautwa8NQAJuZSPjrXLKHUxSnM9YLMXR3JDP2ogz oezydmOdVFGjkpUf40jWHnaE0Z8wJ7C/0nOTKVVQj/zdEBN2yPWLnnXAhuUJhA95KRga uZ1w== 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=bykKUGCflVir5L1X693JNtqoexPRstJK20ieV2db78g=; b=j1z1MskPmqtoE442rE1OhoQDl4l/o+D4Ew48E355XrAljMbcDSH0RYqTAO3cuJWuQ8 cMfvblFtvvBJWWdseZvBPDPZxT+5UFFQQvi7YURV/pyaXjdFZPfg/gFsCtmNUhuw3AdT xbmTz8CT/Rai9NWE0iIQIXM0FnNcGiK/UdzLJCVBOdIj7D7QjilH235HPEynF4on7/4q xXJwrchVTpU5/a1uZvLkU8wbAXW0rAcuMX2HWZyD3QfZxx+AFQazd1XE6UPjGpEKm0du bjiAB27I6+HnNOn/+G/vyMiwZf/TB4ROdmhhgL7iyLBK6dXUiHRWcCff2ACScgs8WMTh gz0Q== X-Gm-Message-State: APjAAAUf7+DETbkHq9X8c8ykwM1EWIgJIdcG4P9oq5NCt81IaAGvXsLh 79/+9Le4T78QZm4hukD6c+8UXKDAXh0= X-Received: by 2002:a17:902:7617:: with SMTP id k23mr28208583pll.175.1558298330853; Sun, 19 May 2019 13:38:50 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id i7sm11397448pfo.19.2019.05.19.13.38.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 13:38:50 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Sun, 19 May 2019 13:37:18 -0700 Message-Id: <20190519203726.20729-67-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190519203726.20729-1-richard.henderson@linaro.org> References: <20190519203726.20729-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::641 Subject: [Qemu-devel] [PATCH v7 66/74] linux-user: Split out getrusage 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-defs.h b/linux-user/syscall-defs.h index 34426a2e23..446175af84 100644 --- a/linux-user/syscall-defs.h +++ b/linux-user/syscall-defs.h @@ -75,6 +75,7 @@ SYSCALL_DEF(getppid); #ifdef TARGET_NR_getrlimit SYSCALL_DEF(getrlimit, ARG_DEC, ARG_PTR); #endif +SYSCALL_DEF(getrusage, ARG_DEC, ARG_PTR); SYSCALL_DEF(getsid, ARG_DEC); #ifdef TARGET_NR_getxpid SYSCALL_DEF(getxpid); diff --git a/linux-user/syscall-proc.inc.c b/linux-user/syscall-proc.inc.c index 1238b08191..bf9e278bf0 100644 --- a/linux-user/syscall-proc.inc.c +++ b/linux-user/syscall-proc.inc.c @@ -499,6 +499,18 @@ SYSCALL_IMPL(getrlimit) return ret; } #endif + +SYSCALL_IMPL(getrusage) +{ + struct rusage rusage; + abi_long ret = get_errno(getrusage(arg1, &rusage)); + + if (!is_error(ret)) { + ret = host_to_target_rusage(arg2, &rusage); + } + return ret; +} + SYSCALL_IMPL(getsid) { return get_errno(getsid(arg1)); diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 401450b0e3..5fe52c775d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4240,15 +4240,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, void *p; switch(num) { - case TARGET_NR_getrusage: - { - struct rusage rusage; - ret = get_errno(getrusage(arg1, &rusage)); - if (!is_error(ret)) { - ret = host_to_target_rusage(arg2, &rusage); - } - } - return ret; case TARGET_NR_gettimeofday: { struct timeval tv; diff --git a/linux-user/strace.list b/linux-user/strace.list index 711ad9c0aa..00a32bc616 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -283,9 +283,6 @@ #ifdef TARGET_NR_get_robust_list { TARGET_NR_get_robust_list, "get_robust_list" , NULL, NULL, NULL }, #endif -#ifdef TARGET_NR_getrusage -{ TARGET_NR_getrusage, "getrusage" , NULL, NULL, NULL }, -#endif #ifdef TARGET_NR_getsockname { TARGET_NR_getsockname, "getsockname" , NULL, NULL, NULL }, #endif
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/syscall-defs.h | 1 + linux-user/syscall-proc.inc.c | 12 ++++++++++++ linux-user/syscall.c | 9 --------- linux-user/strace.list | 3 --- 4 files changed, 13 insertions(+), 12 deletions(-) -- 2.17.1