futex.2: Use syscall(SYS_...); for system calls without a wrapper
commit0aa385fe2517ebe598e5bbf786d1c48c944bc187
authorAlejandro Colomar <alx.manpages@gmail.com>
Mon, 10 May 2021 17:55:10 +0000 (10 19:55 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 11 May 2021 05:18:08 +0000 (11 17:18 +1200)
treea806831bc2f85fff4e6e6eb1674bd5159da5ed7a
parent1cf69258ad61c546bd4145b45f1e77b8510cd876
futex.2: Use syscall(SYS_...); for system calls without a wrapper

At the same time, document only headers that are required
for calling the function, or those that are specific to the
function:

<unistd.h> is required for the syscall() prototype.
<sys/syscall.h> is required for the syscall name SYS_xxx.
<linux/futex.h> is specific to this syscall.

However, uint32_t is generic enough that it shouldn't be
documented here.  The system_data_types(7) page already documents
it, and is more precise about it.  The same goes for timespec.

As a general rule a man[23] page should document the header that
includes the prototype, and all of the headers that define macros
that should be used with the call.  However, the information about
types should be restricted to system_data_types(7) (and that page
should probably be improved by adding types), except for types
that are very specific to the call.  Otherwise, we're duplicating
info and it's then harder to maintain, and probably outdated in
the future.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/futex.2