[RTEMS Project] #1453: _CLOCKS_PER_SEC_ don't work without Posix

RTEMS trac trac at rtems.org
Sun Nov 23 19:14:19 UTC 2014


#1453: _CLOCKS_PER_SEC_ don't work without Posix
-----------------------+----------------------------
 Reporter:  nbkolchin  |       Owner:  joel.sherrill
     Type:  defect     |      Status:  closed
 Priority:  normal     |   Milestone:  4.10
Component:  cpukit     |     Version:  4.10
 Severity:  normal     |  Resolution:  fixed
 Keywords:             |
-----------------------+----------------------------
Changes (by joel.sherrill):

 * version:  unknown => 4.10


Old description:

> Currently, _CLOCKS_PER_SEC_ is defined as:
>
> #define _CLOCKS_PER_SEC_  sysconf(_SC_CLK_TCK)
>
> in Newlib (newlib/libc/include/machine/time.h)
>
> But 'sysconf' is available, only if you enable Posix support inside
> RTEMS. CLOCKS_PER_SEC have little to none, relation with Posix. It is
> part of standard C library.
>
> Possible solutions:
> - move sysconf.c from posix to libcsupport.
> - make special call inside RTEMS just for this information.

New description:

 Currently, _CLOCKS_PER_SEC_ is defined as:

 #define _CLOCKS_PER_SEC_  sysconf(_SC_CLK_TCK)

 in Newlib (newlib/libc/include/machine/time.h)

 But 'sysconf' is available, only if you enable Posix support inside RTEMS.
 CLOCKS_PER_SEC have little to none, relation with Posix. It is part of
 standard C library.

 Possible solutions:
 - move sysconf.c from posix to libcsupport.
 - make special call inside RTEMS just for this information.

--

--
Ticket URL: <http://devel.rtems.org/ticket/1453#comment:2>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list