From 3d66dfc1cb98974df47bf4735291a674d34038bc Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 16 Dec 2008 17:36:01 +0000 Subject: 2008-12-16 Joel Sherrill * libcsupport/src/__times.c, posix/src/adjtime.c, posix/src/clockgetres.c, posix/src/sysconf.c, rtems/src/clockgettickspersecond.c, rtems/src/clockgettod.c, rtems/src/clockset.c, rtems/src/clocktodvalidate.c, score/src/timespecfromticks.c, score/src/timespectoticks.c, score/src/ts64toticks.c: More case converted to use configuration table entry not _TOD_Microseconds_per_tick. --- cpukit/posix/src/adjtime.c | 3 ++- cpukit/posix/src/clockgetres.c | 7 ++++--- cpukit/posix/src/sysconf.c | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'cpukit/posix') diff --git a/cpukit/posix/src/adjtime.c b/cpukit/posix/src/adjtime.c index 42fa1de550..89ccd7950d 100644 --- a/cpukit/posix/src/adjtime.c +++ b/cpukit/posix/src/adjtime.c @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -65,7 +66,7 @@ int adjtime( adjustment += delta->tv_usec; /* too small to account for */ - if ( adjustment < _TOD_Microseconds_per_tick ) + if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) return 0; /* diff --git a/cpukit/posix/src/clockgetres.c b/cpukit/posix/src/clockgetres.c index 9c5f1be925..2698734547 100644 --- a/cpukit/posix/src/clockgetres.c +++ b/cpukit/posix/src/clockgetres.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -51,9 +52,9 @@ int clock_getres( case CLOCK_PROCESS_CPUTIME: case CLOCK_THREAD_CPUTIME: if ( res ) { - res->tv_sec = _TOD_Microseconds_per_tick / 1000000; - res->tv_nsec = _TOD_Microseconds_per_tick * 1000; - /* _TOD_From_ticks( _TOD_Microseconds_per_tick, res ); */ + res->tv_sec = rtems_configuration_get_microseconds_per_tick() / + TOD_MICROSECONDS_PER_SECOND; + res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); } break; diff --git a/cpukit/posix/src/sysconf.c b/cpukit/posix/src/sysconf.c index c0b18ed7dc..6021dec63d 100644 --- a/cpukit/posix/src/sysconf.c +++ b/cpukit/posix/src/sysconf.c @@ -36,11 +36,11 @@ long sysconf( switch (name) { case _SC_CLK_TCK: - return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick); + return (TOD_MICROSECONDS_PER_SECOND / + rtems_configuration_get_microseconds_per_tick()); - case _SC_OPEN_MAX: { - return rtems_libio_number_iops; - } + case _SC_OPEN_MAX: + return rtems_libio_number_iops; case _SC_GETPW_R_SIZE_MAX: return 1024; -- cgit v1.2.3