This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PowerPC - Add a function to read the Time Base frequency


On 8/24/2012 2:35 PM, Tulio Magno Quites Machado Filho wrote:
> Programs that directly read the Time Base register need to get
> access to the frequency at which it is updated to properly calculate the
> time passed between 2 reads.
> librt already has __get_clockfreq that reads this value from the vdso or
> from /proc/cpuinfo. The new function reuses the available one without
> exposing it.
> Notice that this patch does include __get_clockfreq implementation into
> the PowerPC build of libc. However, it will remain out of libc for other
> architectures.
> 
> 2012-08-22  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
> 
> 	* manual/platform.texi (PowerPC): Documents __ppc_get_timebase_freq.
> 	* sysdeps/powerpc/sys/platform/ppc.h: Include the operating
> 	system header.
> 	* sysdeps/unix/sysv/linux/powerpc/Makefile (sysdep_headers):
> 	Likewise.
> 	(sydep_routines): Add the new and the internal functions.
> 	* sysdeps/unix/sysv/linux/powerpc/bits/ppc.h: New file.
> 	* sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c: Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions
> 	(GLIBC_2.17): Add the new function.
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
> 	(GLIBC_2.17): Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
> 	(GLIBC_2.17): Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
> 	(GLIBC_2.17): Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c: New file.

This looks good to me, I don't see anything wrong.

Thanks for adding a testcase *and* documentation!

Ryan should review this as power maintainer.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]