From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id A5D533851C24 for ; Mon, 5 Apr 2021 11:43:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A5D533851C24 Received: by mail-ed1-x533.google.com with SMTP id k8so4812522edn.6 for ; Mon, 05 Apr 2021 04:43:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tWjQFUwfcAoyKlseCTSlmwUL1rf2NPZdTGcyJ/0RvHk=; b=F7F4OXH9nUMMM4O0lg5CFWnpUWLOAGYnjcopMCVCROpRIMat7DSxjXBbalF8PZ3qVS l35eaVjuRIEzB6T61wp96E/sNgNyDHqqm6g0F5JinmHGKE/tYSnuRZMSMIoPY2OjMysf EsIQMFAAbT6AoUgH5d30iAMqwQrp2w4EpqIqOUpYBE7y4cZ1Fo/rZPdlBujnPi6wsmZ+ I2Rk58J80TIfXAD68VSD8yshFnC3MK+6cQ41bOr23XceBjwN7hhxx+ovfv5e3DOiypm+ nvIB4lZ0cbHIClw1KlAD6gNCL5YNwWQdDlYqPJvl6ieA2skqv65CVJoGVgaH9vReGVuy Sk4w== X-Gm-Message-State: AOAM5335pFyVkR3rWd4e6A+oRSzcT6KZV13elyKmiDWSP8iXyhDaALe2 FW6wqtw/2rcnItvZ9hmCtSHvQs99xQ0= X-Google-Smtp-Source: ABdhPJxFOHMHaczo9cAqGYTL146m6FyATHq3rczmYBSHLPAlXZwD/bNg0H09bLD6K/3jK0Uasx3qhg== X-Received: by 2002:a05:6402:354b:: with SMTP id f11mr30666927edd.361.1617622992305; Mon, 05 Apr 2021 04:43:12 -0700 (PDT) Received: from ?IPv6:2001:a61:2553:a401:cfc6:2039:a9ec:21ff? ([2001:a61:2553:a401:cfc6:2039:a9ec:21ff]) by smtp.gmail.com with ESMTPSA id q12sm8610020ejy.91.2021.04.05.04.43.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Apr 2021 04:43:11 -0700 (PDT) Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: Re: [PATCH v5 28/35] io_cancel.2: Use syscall(SYS_...); for system calls without a wrapper To: Alejandro Colomar References: <20210403194026.102818-1-alx.manpages@gmail.com> <20210404115847.78166-29-alx.manpages@gmail.com> From: "Michael Kerrisk (man-pages)" Message-ID: <36c24545-25af-2bc8-7e7e-3d95a8b85fd6@gmail.com> Date: Mon, 5 Apr 2021 13:43:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210404115847.78166-29-alx.manpages@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, 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-List-Received-Date: Mon, 05 Apr 2021 11:43:15 -0000 Hi Alex. On 4/4/21 1:58 PM, Alejandro Colomar wrote: > In this case there's a wrapper provided by libaio, > but this page documents the raw kernel syscall. Okay. Patch applied. Thanks, Michael > > Signed-off-by: Alejandro Colomar > --- > man2/io_cancel.2 | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/man2/io_cancel.2 b/man2/io_cancel.2 > index e09984ecd..248fe5791 100644 > --- a/man2/io_cancel.2 > +++ b/man2/io_cancel.2 > @@ -9,14 +9,13 @@ > io_cancel \- cancel an outstanding asynchronous I/O operation > .SH SYNOPSIS > .nf > -.BR "#include " " /* Defines needed types */" > +.BR "#include " " /* Definition of needed types */" > +.BR "#include " " /* Definition of " SYS_* " constants */" > +.B #include > .PP > -.BI "int io_cancel(aio_context_t " ctx_id ", struct iocb *" iocb , > -.BI " struct io_event *" result ); > +.BI "int syscall(SYS_io_cancel, aio_context_t " ctx_id ", struct iocb *" iocb , > +.BI " struct io_event *" result ); > .fi > -.PP > -.IR Note : > -There is no glibc wrapper for this system call; see NOTES. > .SH DESCRIPTION > .IR Note : > this page describes the raw Linux system call interface. > @@ -68,10 +67,7 @@ The asynchronous I/O system calls first appeared in Linux 2.5. > is Linux-specific and should not be used > in programs that are intended to be portable. > .SH NOTES > -Glibc does not provide a wrapper for this system call. > -You could invoke it using > -.BR syscall (2). > -But instead, you probably want to use the > +You probably want to use the > .BR io_cancel () > wrapper function provided by > .\" http://git.fedorahosted.org/git/?p=libaio.git > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/