diff --git a/c/src/exec/libcsupport/ChangeLog b/c/src/exec/libcsupport/ChangeLog index 6f89046aa5..56a6459357 100755 --- a/c/src/exec/libcsupport/ChangeLog +++ b/c/src/exec/libcsupport/ChangeLog @@ -1,3 +1,7 @@ +2002-07-01 Joel Sherrill + + * src/__times.c: Corrected from previous attempt to cleanup. + 2002-07-01 Ralf Corsepius * configure.ac: Remove RTEMS_PROJECT_ROOT. diff --git a/c/src/exec/libcsupport/src/__times.c b/c/src/exec/libcsupport/src/__times.c index 3b23f3764a..7c06a879f1 100644 --- a/c/src/exec/libcsupport/src/__times.c +++ b/c/src/exec/libcsupport/src/__times.c @@ -27,14 +27,19 @@ clock_t _times( struct tms *ptms ) { - rtems_status_code status; - rtems_interval ticks; + rtems_interval ticks; if ( !ptms ) { errno = EFAULT; return -1; } + /* + * This call does not depend on TOD being initialized and can't fail. + */ + + (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks ); + /* * RTEMS technically has no notion of system versus user time * since there is no separation of OS from application tasks. diff --git a/cpukit/libcsupport/ChangeLog b/cpukit/libcsupport/ChangeLog index 2a4b757fe3..fbfdd602f1 100644 --- a/cpukit/libcsupport/ChangeLog +++ b/cpukit/libcsupport/ChangeLog @@ -1,4 +1,8 @@ +2002-07-01 Joel Sherrill + + * src/__times.c: Corrected from previous attempt to cleanup. + 2002-07-01 Ralf Corsepius * configure.ac: Remove RTEMS_PROJECT_ROOT. diff --git a/cpukit/libcsupport/src/__times.c b/cpukit/libcsupport/src/__times.c index 3b23f3764a..7c06a879f1 100644 --- a/cpukit/libcsupport/src/__times.c +++ b/cpukit/libcsupport/src/__times.c @@ -27,14 +27,19 @@ clock_t _times( struct tms *ptms ) { - rtems_status_code status; - rtems_interval ticks; + rtems_interval ticks; if ( !ptms ) { errno = EFAULT; return -1; } + /* + * This call does not depend on TOD being initialized and can't fail. + */ + + (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks ); + /* * RTEMS technically has no notion of system versus user time * since there is no separation of OS from application tasks.