#1453 closed defect (fixed)

_CLOCKS_PER_SEC_ don't work without Posix

Reported by: Nickolay Semyonov-Kolchin Owned by: Joel Sherrill
Priority: normal Milestone: 4.10
Component: score Version: 4.10
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Joel Sherrill)

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.

Attachments (1)

pr1453.diff (468 bytes) - added by Joel Sherrill on Jun 16, 2010 at 6:09:26 PM.
add sysconf.c to set always built in posix since newlib uses it

Download all attachments as: .zip

Change History (3)

Changed on Jun 16, 2010 at 6:09:26 PM by Joel Sherrill

Attachment: pr1453.diff added

add sysconf.c to set always built in posix since newlib uses it

comment:1 Changed on Jun 16, 2010 at 6:12:37 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Patch applied to 4.10 and head.

comment:2 Changed on Nov 23, 2014 at 7:14:19 PM by Joel Sherrill

Description: modified (diff)
Version: unknown4.10
Note: See TracTickets for help on using tickets.