This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH, RTEMS] Fix CLOCKS_PER_SEC
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: Gedare Bloom <gedare at rtems dot org>, "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Tue, 3 Mar 2015 11:51:31 -0600
- Subject: Re: [PATCH, RTEMS] Fix CLOCKS_PER_SEC
- Authentication-results: sourceware.org; auth=none
- References: <CAC82fA0eBsShOsL5jLjZiFafb+r7+0zu4L4ZQgf1GEFKdOARVQ at mail dot gmail dot com>
This patch is correct per POSIX.
http://pubs.opengroup.org/onlinepubs/009695399/functions/clock.html
Gedare addressed the path to our clock() implementation and that should
now be consistent.
I am curious how the #else targets are correct given the POSIX definition.
For RTEMS, is this OK to apply?
--joel
On 3/3/2015 10:24 AM, Gedare Bloom wrote:
> RTEMS use of _SC_CLK_TCK for CLOCKS_PER_SEC is broken [1]. Attached
> patch makes RTEMS use the constant value of 1000000 like Linux and
> BSD.
>
> Gedare
>
> [1] https://devel.rtems.org/ticket/2182
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985