diff options
Diffstat (limited to 'c/src/exec/libcsupport')
-rwxr-xr-x | c/src/exec/libcsupport/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/exec/libcsupport/src/__times.c | 21 |
2 files changed, 14 insertions, 13 deletions
diff --git a/c/src/exec/libcsupport/ChangeLog b/c/src/exec/libcsupport/ChangeLog index 0b329cd4cc..8b29d6c61b 100755 --- a/c/src/exec/libcsupport/ChangeLog +++ b/c/src/exec/libcsupport/ChangeLog @@ -1,3 +1,9 @@ +2002-06-28 Joel Sherrill <joel@OARcorp.com> + + * src/__times.c: Cleaned up comments, return more information, + and eliminated the fatal error on clock not set since it cannot + occur. + 2002-06-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de> * configure.ac: Use AC_CONFIG_AUX_DIR(../..). diff --git a/c/src/exec/libcsupport/src/__times.c b/c/src/exec/libcsupport/src/__times.c index eab408e8d3..3b23f3764a 100644 --- a/c/src/exec/libcsupport/src/__times.c +++ b/c/src/exec/libcsupport/src/__times.c @@ -35,25 +35,20 @@ clock_t _times( return -1; } - /* "POSIX" does not seem to allow for not having a TOD */ - status = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks ); - if ( status != RTEMS_SUCCESSFUL ) { - assert( 0 ); - return -1; - } - /* - * RTEMS has no notion of system versus user time and although - * a way to keep track of per task CPU usage was added since - * 3.6.0, this routine does not utilize it yet. + * RTEMS technically has no notion of system versus user time + * since there is no separation of OS from application tasks. + * But we can at least make a distinction between the number + * of ticks since boot and the number of ticks executed by this + * this thread. */ - ptms->tms_utime = ticks; - ptms->tms_stime = 0; + ptms->tms_utime = _Thread_Executing->ticks_executed; + ptms->tms_stime = ticks; ptms->tms_cutime = 0; ptms->tms_cstime = 0; - return 0; + return ticks; } /* |