Message ID | 20180610030220.3777-46-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-v6csp2595736lji; Sat, 9 Jun 2018 20:42:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKokQzjrbIjq4+bZdkW53CYG03ksJm6H5A8nbgnvgZV7UOdWLqyvfH2J8xxGAUCb07kQZQg X-Received: by 2002:ae9:df06:: with SMTP id t6-v6mr10162068qkf.46.1528602156198; Sat, 09 Jun 2018 20:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528602156; cv=none; d=google.com; s=arc-20160816; b=JUpxdSGhAy9BdN0hqNykv+ovTVZVbv/TBGoT04dVISuGY+Cqlz+QqCPFyZ7ffq7jzF 6CsNwb+NgywtCetdGgNV9fOmn/jbxzqgJxJ/+H4nCxQTEVhqeytADIJTc3SbwYkaPclr pLLpDspDEEWvaLhCrmNI6ai3PMJ85a5Wy3/GJDq5s2yH3PUdar3FFKdbBQpSHEmahabc hFWHO9cDffIPshtuVbnQpiR2a4Ap0q83vu/0Kv+MDSYg07qvc1gxjT8XUSTKbTRob+TZ AKwR/h9gvf6bYijXWLwk2T08R2sT3YqFbfu+Q2jgNENPOQA9IcJUJ+lIQWTnmjZtEBRG V2ig== 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=0/K+nhAHgOYfScD/OD6yrOXgVFZcrI0ZG2H89d5kxRs=; b=Fi/HosZQw2ayZ2hgR+OYxdzOOuGhrjy0t0d2H3WlyUFO24aQMhFRfPMiL2mngTr3Ca 54NHFX4uZAxDr1V5PkRVgXFS3CkcmRrozyobg3/7CPSM1SQzChjZeUaRpNrh5tURTwC6 ofGe7jOleFsKRlSFmVpwIHHLOSjVR+kS/AEKe6B9E2Hy+bs/lnANb/3BQ75E8h3E1TQg GA9Eu+3vMofgx5hPDCUGqjsjJtYt9yuoIu88/0PrAJyvxzhQi6+n2jMMFGM16L4iG/Tu tBd8halC6tdgAQbTBCTQvxVGOJ8OSRCvWKerem7xzDMKjlQziJLcQR+R6EElcLRLq6JH rB9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WAPKdIyb; 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 p1-v6si1869475qtg.172.2018.06.09.20.42.36 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 09 Jun 2018 20:42: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=WAPKdIyb; 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]:42393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fRrFT-0003fb-IO for patch@linaro.org; Sat, 09 Jun 2018 23:42:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqeE-0002w8-UM for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqeD-0003fr-VA for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:06 -0400 Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]:39881) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqeD-0003fX-Oq for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:05 -0400 Received: by mail-pl0-x243.google.com with SMTP id f1-v6so10399814plt.6 for <qemu-devel@nongnu.org>; Sat, 09 Jun 2018 20:04:05 -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=0/K+nhAHgOYfScD/OD6yrOXgVFZcrI0ZG2H89d5kxRs=; b=WAPKdIyb2rgvk2CeTemSEE25RiNDFrSA4ZmRW96xPOrI5CU1LB1Kx+dgSxS5i+7plE nyxtv3LerR3KuNu6OIYCEgkLh7fMdtOEZX51Cc523UmbdRVWR6r+Qs9jX9AU9NpC0s5D nnQ04Muw1yGRH1fJA+cROzv8IYTabgsphK+6g= 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=0/K+nhAHgOYfScD/OD6yrOXgVFZcrI0ZG2H89d5kxRs=; b=ps3draHFW4Sz98jvIiJuWv/F9vBETvro/XHP+A16IQmF1l8IO5KI3ZBk6+plC0iC8Z zytN5AvqRNCjmAL/s89g9yQyLPBpPHpZ5W4KOqqjfMTxVErFmJZ7hE0I3CevsQR1NrHg XUUM3InqH0Mt9W+ybXVRe5L/es5+UuxnObpkVRhb0dJgANbt+yVbLLkx414YT1xhUb6J 2FCcLJupDk82FAuDaAcuayFIrH8kpUuNl5mz8bimcVdAA1uBJ4HrWEvBGdLvov6Mukf/ LiCdNTQp/4Bu9PkZ6/goWh8QzDiSRGPN+AleVNjcvbTL5Ngw66IJsIKgu+wF/sCu0hct oc0A== X-Gm-Message-State: APt69E3Gmjh77+fIuk1Z+wKxxSBnB1plS9xIk45ne9atnfkuVoKx3T0N h6R4wa2ZEmYUaOZArppeS+X5w1qDQqA= X-Received: by 2002:a17:902:43:: with SMTP id 61-v6mr12925191pla.112.1528599844606; Sat, 09 Jun 2018 20:04:04 -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.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 20:04:03 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Sat, 9 Jun 2018 17:01:17 -1000 Message-Id: <20180610030220.3777-46-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::243 Subject: [Qemu-devel] [PATCH v2 045/108] linux-user: Split out accept, accept4, bind, connect 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 d50c84614e..155da4f523 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7730,6 +7730,18 @@ static abi_long impl_##NAME(void *cpu_env, unsigned num, abi_long arg1, \ abi_long arg5, abi_long arg6, abi_long arg7, \ abi_long arg8) +#ifdef TARGET_NR_accept +IMPL(accept) +{ + return do_accept4(arg1, arg2, arg3, 0); +} +#endif + +IMPL(accept4) +{ + return do_accept4(arg1, arg2, arg3, arg4); +} + #ifdef TARGET_NR_access IMPL(access) { @@ -7769,6 +7781,13 @@ IMPL(alarm) } #endif +#ifdef TARGET_NR_bind +IMPL(bind) +{ + return do_bind(arg1, arg2, arg3); +} +#endif + IMPL(brk) { return do_brk(arg1); @@ -7821,6 +7840,13 @@ IMPL(close) return get_errno(close(arg1)); } +#ifdef TARGET_NR_connect +IMPL(connect) +{ + return do_connect(arg1, arg2, arg3); +} +#endif + #ifdef TARGET_NR_creat IMPL(creat) { @@ -9925,22 +9951,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1, void *p; switch(num) { -#ifdef TARGET_NR_accept - case TARGET_NR_accept: - return do_accept4(arg1, arg2, arg3, 0); -#endif -#ifdef TARGET_NR_accept4 - case TARGET_NR_accept4: - return do_accept4(arg1, arg2, arg3, arg4); -#endif -#ifdef TARGET_NR_bind - case TARGET_NR_bind: - return do_bind(arg1, arg2, arg3); -#endif -#ifdef TARGET_NR_connect - case TARGET_NR_connect: - return do_connect(arg1, arg2, arg3); -#endif #ifdef TARGET_NR_getpeername case TARGET_NR_getpeername: return do_getpeername(arg1, arg2, arg3); @@ -12769,9 +12779,16 @@ static impl_fn *syscall_table(unsigned num) #ifdef TARGET_NR_access SYSCALL(access); #endif +#ifdef TARGET_NR_accept + SYSCALL(accept); +#endif + SYSCALL(accept4); SYSCALL(acct); #ifdef TARGET_NR_alarm SYSCALL(alarm); +#endif +#ifdef TARGET_NR_bind + SYSCALL(bind); #endif SYSCALL(brk); SYSCALL(close); @@ -12780,6 +12797,9 @@ static impl_fn *syscall_table(unsigned num) #ifdef TARGET_NR_chmod SYSCALL(chmod); #endif +#ifdef TARGET_NR_connect + SYSCALL(connect); +#endif #ifdef TARGET_NR_creat SYSCALL(creat); #endif
All targets define accept4; remove the ifdef. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/syscall.c | 52 ++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 16 deletions(-) -- 2.17.1