Re: [PATCH] getcpu.2: getcpu() now has a glibc wrapper; remove mention of syscall(2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Tobias,

On 2/6/19 9:07 AM, Tobias Klauser wrote:
> The glibc wrapper was added in glibc 2.29, release on 1 Feb 2019.
> 
> Signed-off-by: Tobias Klauser <tklauser@xxxxxxxxxx>
> ---
>  man2/getcpu.2 | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/man2/getcpu.2 b/man2/getcpu.2
> index c66f3d4a139e..88f8cdb8eb73 100644
> --- a/man2/getcpu.2
> +++ b/man2/getcpu.2
> @@ -19,9 +19,6 @@ getcpu \- determine CPU and NUMA node on which the calling thread is running
>  .BI "int getcpu(unsigned *" cpu ", unsigned *" node \
>  ", struct getcpu_cache *" tcache );
>  .fi
> -.PP
> -.IR Note :
> -There is no glibc wrapper for this system call; see NOTES.
>  .SH DESCRIPTION
>  The
>  .BR getcpu ()
> @@ -82,12 +79,6 @@ The intention of
>  is to allow programs to make optimizations with per-CPU data
>  or for NUMA optimization.
>  .PP
> -Glibc does not provide a wrapper for this system call; call it using
> -.BR syscall (2);
> -or use
> -.BR sched_getcpu (3)
> -instead.
> -.PP
>  The
>  .I tcache
>  argument is unused since Linux 2.6.24.

Thanks. Patch applied, and I followed it up with the patch below.

Cheers,

Michael

diff --git a/man2/getcpu.2 b/man2/getcpu.2
index 88f8cdb8e..c6e5bdbff 100644
--- a/man2/getcpu.2
+++ b/man2/getcpu.2
@@ -67,6 +67,10 @@ Arguments point outside the calling process's address space.
 .SH VERSIONS
 .BR getcpu ()
 was added in kernel 2.6.19 for x86-64 and i386.
+Library support was added in glibc 2.29
+(Earlier glibc versions did not provide a wrapper for this system call,
+necessitating the use of
+.BR syscall (2).)
 .SH CONFORMING TO
 .BR getcpu ()
 is Linux-specific.



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux