From patchwork Sun Jun 10 03:01:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 138135 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2597857lji; Sat, 9 Jun 2018 20:46:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKmwufAnaB1crmV/qNVsSM94dvwcC8tpw6l/Uaw/zAphHTbzFVc1axBzDRjYG5FFRJcD7F0 X-Received: by 2002:ac8:1af0:: with SMTP id h45-v6mr11028799qtk.16.1528602396560; Sat, 09 Jun 2018 20:46:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528602396; cv=none; d=google.com; s=arc-20160816; b=md6rdyjB9BshxqmdF1uPC/7KCbm4q/BaSBi8cNVFNnCZUcMPBIq8tnrWeWlgIMPESw pi88nepp0xvuQjyC2ScSo/wOgFc57PWXVbDzzYcS6N6anGV3wTB+ajam4VeWAX3RvrhK 8RiXvGJbY95Kra7QFSBtDG7dlAu4BP/4u2zINlobQXBBP/GnyKver2/2xNQzEGYX3KWK WzxJGAmGi7ff5RSAPh5jrEjcE+UNChoXI1F0VVyzfYrqzSLYs8WlAvJnu0xkW6yin4Wo yXDO96U2/ROfl2imKzyuLzPqd5WYk34A+HWn3QcFM2rzFRKz7E8kcvdbCaH0GkeGZDAS Mu4w== 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=yikHZIxzjoyUKNQPQDvJAn42HOCHs6MNr67IyjVvUqY=; b=hr9aOsuXQACmJHg15KjKhjwhWMmoQa8oCtm0ztJUtQL+BR2OZGrRntB3bwlxU/KuiW lBs+IfD0fH4DKqgmtSUjkrgSnmVl/ps7FGn55v4MPJOV17F0b873PK5/Zd+p3NyvsoOu 0FwJqSEvwZ2klwEcDb/FDjw4NZaVRSmeGG5AFtI//sI56mCE6hS42/x49Ud8vgN7Opkh ol+Oj3WhSpYBxT/Y3ybIB/GhU+BiiDb5mJNTwrWJPqLHghO15EZY8lBHSBiXxeGoYmGL j5wp4o/987HdfuZBmGGoSBex6dnlabfYsj6qoPemxp/Pb2euoTh1phzsnGeDJeYiuWcI FExQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PUYCTjPD; 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: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id e48-v6si1501356qtc.270.2018.06.09.20.46.36 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 09 Jun 2018 20:46:36 -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=PUYCTjPD; 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]:42417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRrJM-0007u1-0l for patch@linaro.org; Sat, 09 Jun 2018 23:46:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRqec-0003Gr-Dm for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRqeZ-0003nS-89 for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:30 -0400 Received: from mail-pl0-x230.google.com ([2607:f8b0:400e:c01::230]:36985) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRqeY-0003n7-W9 for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:27 -0400 Received: by mail-pl0-x230.google.com with SMTP id 31-v6so10386055plc.4 for ; Sat, 09 Jun 2018 20:04:26 -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=yikHZIxzjoyUKNQPQDvJAn42HOCHs6MNr67IyjVvUqY=; b=PUYCTjPDe1gxey5HhE26Q6sJQohyc3bPl648Tu78nwV6DshiH6fiQNTmGdR73vLXox bu0hph8oGnCZoIq8HwzgW1WMhrhjJBbPS87JyYxv4yYvaBndLyus7UbE/oaHvf8A9OYj LRNaHFaMU93ZN2+MIR66vhpyX7cszI0P50gR4= 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=yikHZIxzjoyUKNQPQDvJAn42HOCHs6MNr67IyjVvUqY=; b=cVPqLP/Ce+qiIdsgbhxx9V+dky5Khwe3RyUDncpi5kp6sWsbeZpsV1DW88zFKvcebZ TKxvqrf1Q18vMYsIWSNv+HVO1iF8l3An274RwYLrcJuGwNkxV9tQMzhavecvh+qJjTPf DaeupUBlIbJaRFTeXOhfqgTCQ0W2VZ1oGQ/iXB47806T3d4K49pmpO2rSncXgFMDjMh8 VvIE71fBCQ9LiQwv7ULtHNmQgUqtpgyuG5cznZHmXnq7OO7Ov11kk4PuwChloZ2qXYd5 pmGu0RC9POIztd/DJxHc+y4ggkazNsX/0uZiYmNXCvgLHXjpCZ5sjeOQxBSamQuOZleN UvVg== X-Gm-Message-State: APt69E3c0yC5c9O54wBk1pFekBaZx8+XnXG9n5uglmxFV4XlXG5sfLUo JJ0ZR1WB5xBClMLx9DH+TWw7sdnQs98= X-Received: by 2002:a17:902:8b8c:: with SMTP id ay12-v6mr12844630plb.74.1528599865684; Sat, 09 Jun 2018 20:04:25 -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.04.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 20:04:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 9 Jun 2018 17:01:27 -1000 Message-Id: <20180610030220.3777-56-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:c01::230 Subject: [Qemu-devel] [PATCH v2 055/108] linux-user: Split out ipc syscalls X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is msgctl, msgget, msgrcv, msgsnd, shmat, shmctl, shmdt, shmget, semctl, semget, semop. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 154 ++++++++++++++++++++++++++++++------------- 1 file changed, 110 insertions(+), 44 deletions(-) -- 2.17.1 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 6ac7532ea6..1c3a4590fb 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8636,6 +8636,34 @@ IMPL(mremap) return get_errno(target_mremap(arg1, arg2, arg3, arg4, arg5)); } +#ifdef TARGET_NR_msgctl +IMPL(msgctl) +{ + return do_msgctl(arg1, arg2, arg3); +} +#endif + +#ifdef TARGET_NR_msgget +IMPL(msgget) +{ + return get_errno(msgget(arg1, arg2)); +} +#endif + +#ifdef TARGET_NR_msgrcv +IMPL(msgrcv) +{ + return do_msgrcv(arg1, arg2, arg3, arg4, arg5); +} +#endif + +#ifdef TARGET_NR_msgsnd +IMPL(msgsnd) +{ + return do_msgsnd(arg1, arg2, arg3, arg4); +} +#endif + IMPL(msync) { return get_errno(msync(g2h(arg1), arg2, arg3)); @@ -9340,6 +9368,34 @@ IMPL(sgetmask) } #endif +#ifdef TARGET_NR_shmat +IMPL(shmat) +{ + return do_shmat(cpu_env, arg1, arg2, arg3); +} +#endif + +#ifdef TARGET_NR_shmctl +IMPL(shmctl) +{ + return do_shmctl(arg1, arg2, arg3); +} +#endif + +#ifdef TARGET_NR_shmdt +IMPL(shmdt) +{ + return do_shmdt(arg1); +} +#endif + +#ifdef TARGET_NR_shmget +IMPL(shmget) +{ + return get_errno(shmget(arg1, arg2, arg3)); +} +#endif + #ifdef TARGET_NR_shutdown IMPL(shutdown) { @@ -9358,6 +9414,27 @@ IMPL(select) } #endif +#ifdef TARGET_NR_semctl +IMPL(semctl) +{ + return do_semctl(arg1, arg2, arg3, arg4); +} +#endif + +#ifdef TARGET_NR_semget +IMPL(semget) +{ + return get_errno(semget(arg1, arg2, arg3)); +} +#endif + +#ifdef TARGET_NR_semop +IMPL(semop) +{ + return do_semop(arg1, arg2, arg3); +} +#endif + #ifdef TARGET_NR_send IMPL(send) { @@ -10272,50 +10349,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1, void *p; switch(num) { -#ifdef TARGET_NR_semget - case TARGET_NR_semget: - return get_errno(semget(arg1, arg2, arg3)); -#endif -#ifdef TARGET_NR_semop - case TARGET_NR_semop: - return do_semop(arg1, arg2, arg3); -#endif -#ifdef TARGET_NR_semctl - case TARGET_NR_semctl: - return do_semctl(arg1, arg2, arg3, arg4); -#endif -#ifdef TARGET_NR_msgctl - case TARGET_NR_msgctl: - return do_msgctl(arg1, arg2, arg3); -#endif -#ifdef TARGET_NR_msgget - case TARGET_NR_msgget: - return get_errno(msgget(arg1, arg2)); -#endif -#ifdef TARGET_NR_msgrcv - case TARGET_NR_msgrcv: - return do_msgrcv(arg1, arg2, arg3, arg4, arg5); -#endif -#ifdef TARGET_NR_msgsnd - case TARGET_NR_msgsnd: - return do_msgsnd(arg1, arg2, arg3, arg4); -#endif -#ifdef TARGET_NR_shmget - case TARGET_NR_shmget: - return get_errno(shmget(arg1, arg2, arg3)); -#endif -#ifdef TARGET_NR_shmctl - case TARGET_NR_shmctl: - return do_shmctl(arg1, arg2, arg3); -#endif -#ifdef TARGET_NR_shmat - case TARGET_NR_shmat: - return do_shmat(cpu_env, arg1, arg2, arg3); -#endif -#ifdef TARGET_NR_shmdt - case TARGET_NR_shmdt: - return do_shmdt(arg1); -#endif case TARGET_NR_fsync: return get_errno(fsync(arg1)); case TARGET_NR_clone: @@ -12943,6 +12976,18 @@ static impl_fn *syscall_table(unsigned num) SYSCALL(mount); SYSCALL(mprotect); SYSCALL(mremap); +#ifdef TARGET_NR_msgctl + SYSCALL(msgctl); +#endif +#ifdef TARGET_NR_msgget + SYSCALL(msgget); +#endif +#ifdef TARGET_NR_msgrcv + SYSCALL(msgrcv); +#endif +#ifdef TARGET_NR_msgsnd + SYSCALL(msgsnd); +#endif SYSCALL(msync); SYSCALL(munlock); SYSCALL(munlockall); @@ -13010,6 +13055,18 @@ static impl_fn *syscall_table(unsigned num) #ifdef TARGET_NR_sgetmask SYSCALL(sgetmask); #endif +#ifdef TARGET_NR_shmat + SYSCALL(shmat); +#endif +#ifdef TARGET_NR_shmctl + SYSCALL(shmctl); +#endif +#ifdef TARGET_NR_shmdt + SYSCALL(shmdt); +#endif +#ifdef TARGET_NR_shmget + SYSCALL(shmget); +#endif #ifdef TARGET_NR_shutdown SYSCALL(shutdown); #endif @@ -13020,6 +13077,15 @@ static impl_fn *syscall_table(unsigned num) SYSCALL(select); # endif #endif +#ifdef TARGET_NR_semctl + SYSCALL(semctl); +#endif +#ifdef TARGET_NR_semget + SYSCALL(semget); +#endif +#ifdef TARGET_NR_semop + SYSCALL(semop); +#endif #ifdef TARGET_NR_send SYSCALL(send); #endif