Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D997EC433ED for ; Sat, 3 Apr 2021 19:41:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AED8C6134F for ; Sat, 3 Apr 2021 19:41:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236768AbhDCTmA (ORCPT ); Sat, 3 Apr 2021 15:42:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236736AbhDCTl7 (ORCPT ); Sat, 3 Apr 2021 15:41:59 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B50F4C0613E6 for ; Sat, 3 Apr 2021 12:41:56 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id f6so1393843wrv.12 for ; Sat, 03 Apr 2021 12:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EpXhDfjANekpqRoKyHYo29H6mLCXF+4mapysiZHKSf0=; b=bWjhE2A7218Y349FhyJmodAJwg6OTrjneXRNiAOVS117qKAxjhgCNxCsirZCkxSGfv UpRoEpTOtwQ0LOeBm8kPxWcScayFF4bhUj1sCIYlcKp5TyGHS+eaDKOu3NOM1dus8OW/ 050hH/RewO00g6Hhy5DdQWYShuWVvfXaBLZ9rXs5nhX/35sDTjctzXeM7TJfeMqhUSWP RWulqUXp/shnm7LMTHhXAnMZx+1i9xk/pOipBYclEWlCT8N9whgtoDs2TemmDun0Unbp G1EPVbAwoe5FfbyCTncRgOt0QW6yQN8/ajHwHUm+n+zz4xs9S8Gtht5T10644IxIWCz3 fv4g== 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=S72hwziUklKy+ypimiEdvRIMedf+laBLm8w86yeKA5IvhjMyhk0ZtJG23Bgzg7TXrL 7lJ1MhKIuxslAqovQ5oZwz7vafhi1yLTAl7F9wSV1b6l5kcBvFoE/TLpB2IO/M5V8fBl 7uuNmWMYJ1MhFCnTwzUdb0dhTDr4kmQbIoUiwK95dHhgdedEhgyNefTc+IrFBynWFoPC BVguvBwgmwplhhWbuap3XYLaUCPETfD2V1z1sBZVCjUzKCQMuCFk4KpObbRfhotUUu+u 69hB1K6sw9t8NSi43gST5Fqm1y3yK6PdFVqfyqEtu1QRT14XzgR7Hzv+8bgr8z0QEOuC QKdQ== X-Gm-Message-State: AOAM530jAGwz/7mqJurzfCMzR68i1lxsUppsgzfkjS85iaUcg8qN5lc9 I0OfVwol3bKsCQOY6u/E0nc= 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) From: Alejandro Colomar To: mtk.manpages@gmail.com Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org 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 -- 2.31.0