From: Alejandro Colomar <alx.manpages@gmail.com>
To: Youssef Hajjioui <youssef.hajjioui.07@gmail.com>
Cc: linux-man@vger.kernel.org, mtk.manpages@gmail.com
Subject: Re: man page pthreads(3)
Date: Sat, 14 May 2022 17:02:48 +0200 [thread overview]
Message-ID: <6967d7d4-cb92-76bb-3084-085edab3fc00@gmail.com> (raw)
In-Reply-To: <c7c6faac-164a-6ddd-f72e-7d034e21d51d@gmail.com>
[Resend to linux-man@ with correct address.]
On 5/14/22 15:42, Alejandro Colomar wrote:
> Hi Youssef,
>
> On 5/7/22 02:25, Youssef Hajjioui wrote:
>> Good day,
>>
>> I would like to report what could be a confusing citation in the
>> manual page |pthreads(3)|
>>
>> The following citation:
>>
>> Each of the threads in a process has a unique thread identifier
>> (stored in a type |pthread_t|). This identifier is returned to the
>> caller of |pthread_create(3)|, and a thread can obtain its own
>> thread identifier using |pthread_self(3)|.
>>
>> However the function |pthread_create(3)| does not return a thread ID
>> to the caller; it returns 0 on success, or a macro that specifies the
>> error i.e (E2BIG and such). The function takes a pointer parameter
>> |pthread_t *thread| which is a pointer to the structure that stores
>> the thread ID.
>> I think that it would avoid confusion to rectify the cited behavior.
>
> I understand your confusion. Some pages use the term return strictly to
> mean C's `return` keyword (as you suggest doing). Some other pages use
> it more freely to mean "pass a value", including both `return` and
> "storing a value in a pointer parameter".
>
> If you propose some alternative wording that makes sense, we can
> consider it.
>
>>
>> My OS is Ubuntu 20.04.
>>
>> I am reading through many manual pages concerning the Linux
>> programming interface. Do you think it is a good idea that I report
>> such confusing occurrences to you. I would like to contribute into
>> making the manual pages clear and easily understandable.
>
> Please do :-)
>
> Thanks!
>
> Alex
>
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
parent reply other threads:[~2022-05-14 15:03 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <c7c6faac-164a-6ddd-f72e-7d034e21d51d@gmail.com>]
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=6967d7d4-cb92-76bb-3084-085edab3fc00@gmail.com \
--to=alx.manpages@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=youssef.hajjioui.07@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox