All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: 佐々木龍路 <tubuannohagi456@gmail.com>
Cc: linux-man@vger.kernel.org
Subject: Re: Possible typo/redundancy in mmap(2) SYNOPSIS
Date: Sun, 12 Apr 2026 16:19:24 +0200	[thread overview]
Message-ID: <adupQhfJQ7kws17U@debian> (raw)
In-Reply-To: <CAKcLgdirzdKqnaziRdYytN-zrVTjijtzOiirL5YJdWF8SSNf+Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 731 bytes --]

Hi,

On 2026-04-12T23:11:47+0900, 佐々木龍路 wrote:
> 1. Where: mmap(2) SYNOPSIS section.
> 2. Issue: There is a semicolon after length and it appears twice,
> which looks like the function has an extra argument.

This is correct.  That's a forward declaration of a function parameter.
They're documented here:

<https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html>


Have a lovely day!
Alex

> 3.Actual display: void *mmap(size_t length;void addr[length],size_t length,...);
> 4. Why it's confusing: From a syscall ABI perspective, rdi should be
> addr, not length. This notation might confuse users about the actual
> number of arguments.
> man 2.13.1
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2026-04-12 14:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-12 14:11 Possible typo/redundancy in mmap(2) SYNOPSIS 佐々木龍路
2026-04-12 14:19 ` Alejandro Colomar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adupQhfJQ7kws17U@debian \
    --to=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=tubuannohagi456@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.