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.
This commit is contained in:
Joel Sherrill
2002-06-28 18:51:35 +00:00
parent d4696ebb5b
commit b43314ae91
4 changed files with 28 additions and 26 deletions

View File

@@ -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(../..).

View File

@@ -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;
}
/*

View File

@@ -1,4 +1,10 @@
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(../..).

View File

@@ -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;
}
/*