public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* Re: man page pthreads(3)
       [not found] ` <c7c6faac-164a-6ddd-f72e-7d034e21d51d@gmail.com>
@ 2022-05-14 15:02   ` Alejandro Colomar
  0 siblings, 0 replies; only message in thread
From: Alejandro Colomar @ 2022-05-14 15:02 UTC (permalink / raw)
  To: Youssef Hajjioui; +Cc: linux-man, mtk.manpages

[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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-14 15:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1af34262-46c3-2c14-8380-37a9b4f2e3f0@gmail.com>
     [not found] ` <c7c6faac-164a-6ddd-f72e-7d034e21d51d@gmail.com>
2022-05-14 15:02   ` man page pthreads(3) Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox