* psxclock/init.c (Init):
	Use CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
	* psxclock/psxclock.scn: Regenerate.
This commit is contained in:
Ralf Corsepius
2011-05-18 05:19:30 +00:00
parent 78f11e20f3
commit 42ba09163e
3 changed files with 16 additions and 10 deletions

View File

@@ -1,3 +1,9 @@
2011-05-16 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* psxclock/init.c (Init):
Use CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
* psxclock/psxclock.scn: Regenerate.
2011-05-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxfile01/test.c, psxmsgq01/init.c, psxreaddir/test.c: Fix tests

View File

@@ -112,7 +112,7 @@ rtems_task Init(
rtems_test_assert( !remaining );
/* print new times to make sure it has changed and we can get the realtime */
sc = clock_gettime( CLOCK_PROCESS_CPUTIME, &tv );
sc = clock_gettime( CLOCK_PROCESS_CPUTIME_ID, &tv );
rtems_test_assert( !sc );
printf("Time since boot: (%" PRItime_t ", %ld)\n", tv.tv_sec,tv.tv_nsec );
@@ -222,29 +222,29 @@ rtems_task Init(
printf( ctime( &tv.tv_sec ) );
empty_line();
puts( "clock_gettime - CLOCK_THREAD_CPUTIME -- ENOSYS" );
puts( "clock_gettime - CLOCK_THREAD_CPUTIME_ID -- ENOSYS" );
#if defined(_POSIX_THREAD_CPUTIME)
{
struct timespec tp;
sc = clock_gettime( CLOCK_THREAD_CPUTIME, &tp );
sc = clock_gettime( CLOCK_THREAD_CPUTIME_ID, &tp );
check_enosys( sc );
}
#endif
puts( "clock_settime - CLOCK_PROCESS_CPUTIME -- ENOSYS" );
puts( "clock_settime - CLOCK_PROCESS_CPUTIME_ID -- ENOSYS" );
#if defined(_POSIX_CPUTIME)
{
struct timespec tp;
sc = clock_settime( CLOCK_PROCESS_CPUTIME, &tp );
sc = clock_settime( CLOCK_PROCESS_CPUTIME_ID, &tp );
check_enosys( sc );
}
#endif
puts( "clock_settime - CLOCK_THREAD_CPUTIME -- ENOSYS" );
puts( "clock_settime - CLOCK_THREAD_CPUTIME_ID -- ENOSYS" );
#if defined(_POSIX_THREAD_CPUTIME)
{
struct timespec tp;
sc = clock_settime( CLOCK_THREAD_CPUTIME, &tp );
sc = clock_settime( CLOCK_THREAD_CPUTIME_ID, &tp );
check_enosys( sc );
}
#endif

View File

@@ -30,7 +30,7 @@ Fri May 24 11:05:06 1996
Init: sec (0), nsec (0) remaining
Init: nanosleep - 1.35 seconds
Fri May 24 11:05:07 1996
clock_gettime - CLOCK_THREAD_CPUTIME -- ENOSYS
clock_settime - CLOCK_PROCESS_CPUTIME -- ENOSYS
clock_settime - CLOCK_THREAD_CPUTIME -- ENOSYS
clock_gettime - CLOCK_THREAD_CPUTIME_ID -- ENOSYS
clock_settime - CLOCK_PROCESS_CPUTIME_ID -- ENOSYS
clock_settime - CLOCK_THREAD_CPUTIME_ID -- ENOSYS
*** END OF POSIX CLOCK TEST ***