From patchwork Sat Apr 3 19:40:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 42855 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 990EA388A409; Sat, 3 Apr 2021 19:42:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 990EA388A409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617478922; bh=EpXhDfjANekpqRoKyHYo29H6mLCXF+4mapysiZHKSf0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=uesPv2Dq6Zd2S8g0kbk+ZSP9LWsp5CdayqYLX4FnHN4nmZ9r0kdXQMB1fxwQ6R4YS ZL4gwY91kJm9EnRlQfq5kNhk4JqnMAldz+2oUoUjy7ek//2P4/rioyHodvNLII8W+o B5oH5fw5mTMtUPO+7qNY+/e6cyVc6K0mx8VMDKaY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 5C66A385141D for ; Sat, 3 Apr 2021 19:41:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5C66A385141D Received: by mail-wr1-x435.google.com with SMTP id k8so7489345wrc.3 for ; Sat, 03 Apr 2021 12:41:56 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=EpXhDfjANekpqRoKyHYo29H6mLCXF+4mapysiZHKSf0=; b=VGJVWNdk8v/hLJa08PQ78JxOwjrzR1S3mKkq8WAqKHSupigrOE4EJdexj/ZHpOeEnY lb4hCHq4sUZZUhQSu4e7qaN/5+8grXw8Umk6U2jcm2twXXyZE1/7VbiANaHX4PlOSkIx b21+QIc3jTkR7ZjCfTbPiJk5ka5QBfHoGvwyea2Gp04EePL8XZ8cKEewp8iyZs44/CDO 9CFR2B6YaSihV+nOIYs3BxmuKnDAkbZkXIcMgsCXoPBFzQLWzTDT4kaOz3+9FrUkmV26 8Rpqj5353lyUkjV6i3IT6V/K4wkWDdXbpquYcUU6OMsigWXKVff68pk7ajh3BpRo2wJD NkbA== X-Gm-Message-State: AOAM5333SYA+qDmwG55Ca+XNtB0HGPADM1Fww6P/eO84rkGOQE7vTdUY uR2Dwe2YPZUSGmC0vlHDREG2RqxLkmY= X-Google-Smtp-Source: ABdhPJy41U8XiJjHK95H389nPVcIFu2uaXQ7SkV6lQVZJJDYCSVP02Od9i1SkQd/FkfXd8wL1/c3jQ== X-Received: by 2002:adf:e5c8:: with SMTP id a8mr21799355wrn.352.1617478915559; Sat, 03 Apr 2021 12:41:55 -0700 (PDT) Received: from localhost.localdomain ([170.253.36.171]) by smtp.googlemail.com with ESMTPSA id n1sm25211056wro.36.2021.04.03.12.41.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Apr 2021 12:41:55 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v4 11/35] clone.2: Use syscall(SYS_...); for system calls without a wrapper Date: Sat, 3 Apr 2021 21:40:03 +0200 Message-Id: <20210403194026.102818-12-alx.manpages@gmail.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210403194026.102818-1-alx.manpages@gmail.com> References: <20210403194026.102818-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The CLONE_* constants seem to be available from either or , and since clone3() already includes for 'struct clone_args', is not really needed, AFAICS; however, to avoid confussion, I also included for clone3() for consistency: clone() is getting CLONE_* from , and it would confuse the reader if clone3() got the same CLONE_* constants from a different header. Signed-off-by: Alejandro Colomar --- man2/clone.2 | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/man2/clone.2 b/man2/clone.2 index fa7d1103e..f455c97d8 100644 --- a/man2/clone.2 +++ b/man2/clone.2 @@ -56,13 +56,13 @@ clone, __clone2, clone3 \- create a child process .PP /* For the prototype of the raw clone() system call, see NOTES */ .PP -.BI "long clone3(struct clone_args *" cl_args ", size_t " size ); -.fi +.BR "#include " " /* Definition of " "struct clone_args" " */" +.BR "#include " " /* Definition of " CLONE_* " constants */" +.BR "#include " " /* Definition of " SYS_* " constants */" +.B #include .PP -.IR Note : -There is no glibc wrapper for -.BR clone3 (); -see NOTES. +.BI "long syscall(SYS_clone3, struct clone_args *" cl_args ", size_t " size ); +.fi .SH DESCRIPTION These system calls create a new ("child") process, in a manner similar to @@ -1541,11 +1541,6 @@ One use of these systems calls is to implement threads: multiple flows of control in a program that run concurrently in a shared address space. .PP -Glibc does not provide a wrapper for -.BR clone3 (); -call it using -.BR syscall (2). -.PP Note that the glibc .BR clone () wrapper function makes some changes