From patchwork Sun Apr 4 11:58:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 42890 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 791CD385141D; Sun, 4 Apr 2021 11:59:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 791CD385141D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617537585; 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=N8b/AwzXWsOUN2Ek4kztCK1UGS2wfDTOBsVZfHVI9qtcguKKQyoPGRTi+VhakbHm/ Rj4TNtp2EVxpSno7epMWya3mU0NplvzHrm93m63W5XFvbyoPvf6xpCQWbpJu1RehqH cfYczyHJIz86Xr+H/1chpzYbY09EXYmMHu9zDjBs= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 75F693851C2E for ; Sun, 4 Apr 2021 11:59:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 75F693851C2E Received: by mail-wr1-x42e.google.com with SMTP id x16so8597290wrn.4 for ; Sun, 04 Apr 2021 04:59:41 -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=U9BzTAB42lE18zE/mdd7GNpZt/9wJJt/VJgRQiHfEgbMnu7f/tWWakeHiGT427j7Gw iLIS6vBAvg2+w8H8Eh/GUxpK0Jo0HCv0v1pWwGZ5gCiPcVBMnoFdIsDNLXDFMkY1Mtd5 51El9F9LaXZ1ziO9JauWi6o/MT44OroWcE25OIlG68UXHx/TToOdDxcHEW1iQ+pY4uO0 Mr7xd5EUjRp/5u2AaRntH3zq776XlDugvQUJjlOaS6+KIv86iUlD7R6B9MAalBx5rX38 j7XOiHadnbK2Lypm4Y5q1GjwVfxRH21fvJ9kwZFrh9Sj/XCu9zOCuHbAVoenWfhmlpMb uKog== X-Gm-Message-State: AOAM532W2MAzZnt/XZDUdfDf/Ftj7apIfDIbVUW9Ukh5egTpH+QdQz5k 3iqlx6iVeAezwei2wz6vups= X-Google-Smtp-Source: ABdhPJygohrLnitUEuqcQPZHQm2AQx7ZtOaHFfJ4yDMiiY9NIhK06UxUmYQo+hdA/0sg1vfWgXo+Jg== X-Received: by 2002:a5d:6144:: with SMTP id y4mr24420578wrt.203.1617537580673; Sun, 04 Apr 2021 04:59:40 -0700 (PDT) Received: from localhost.localdomain ([170.253.36.171]) by smtp.googlemail.com with ESMTPSA id u2sm23786967wrp.12.2021.04.04.04.59.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Apr 2021 04:59:40 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v5 11/35] clone.2: Use syscall(SYS_...); for system calls without a wrapper Date: Sun, 4 Apr 2021 13:58:24 +0200 Message-Id: <20210404115847.78166-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.2 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