forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -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>
|
2011-05-06 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* psxfile01/test.c, psxmsgq01/init.c, psxreaddir/test.c: Fix tests
|
* psxfile01/test.c, psxmsgq01/init.c, psxreaddir/test.c: Fix tests
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ rtems_task Init(
|
|||||||
rtems_test_assert( !remaining );
|
rtems_test_assert( !remaining );
|
||||||
|
|
||||||
/* print new times to make sure it has changed and we can get the realtime */
|
/* 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 );
|
rtems_test_assert( !sc );
|
||||||
printf("Time since boot: (%" PRItime_t ", %ld)\n", tv.tv_sec,tv.tv_nsec );
|
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 ) );
|
printf( ctime( &tv.tv_sec ) );
|
||||||
|
|
||||||
empty_line();
|
empty_line();
|
||||||
puts( "clock_gettime - CLOCK_THREAD_CPUTIME -- ENOSYS" );
|
puts( "clock_gettime - CLOCK_THREAD_CPUTIME_ID -- ENOSYS" );
|
||||||
#if defined(_POSIX_THREAD_CPUTIME)
|
#if defined(_POSIX_THREAD_CPUTIME)
|
||||||
{
|
{
|
||||||
struct timespec tp;
|
struct timespec tp;
|
||||||
sc = clock_gettime( CLOCK_THREAD_CPUTIME, &tp );
|
sc = clock_gettime( CLOCK_THREAD_CPUTIME_ID, &tp );
|
||||||
check_enosys( sc );
|
check_enosys( sc );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
puts( "clock_settime - CLOCK_PROCESS_CPUTIME -- ENOSYS" );
|
puts( "clock_settime - CLOCK_PROCESS_CPUTIME_ID -- ENOSYS" );
|
||||||
#if defined(_POSIX_CPUTIME)
|
#if defined(_POSIX_CPUTIME)
|
||||||
{
|
{
|
||||||
struct timespec tp;
|
struct timespec tp;
|
||||||
sc = clock_settime( CLOCK_PROCESS_CPUTIME, &tp );
|
sc = clock_settime( CLOCK_PROCESS_CPUTIME_ID, &tp );
|
||||||
check_enosys( sc );
|
check_enosys( sc );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
puts( "clock_settime - CLOCK_THREAD_CPUTIME -- ENOSYS" );
|
puts( "clock_settime - CLOCK_THREAD_CPUTIME_ID -- ENOSYS" );
|
||||||
#if defined(_POSIX_THREAD_CPUTIME)
|
#if defined(_POSIX_THREAD_CPUTIME)
|
||||||
{
|
{
|
||||||
struct timespec tp;
|
struct timespec tp;
|
||||||
sc = clock_settime( CLOCK_THREAD_CPUTIME, &tp );
|
sc = clock_settime( CLOCK_THREAD_CPUTIME_ID, &tp );
|
||||||
check_enosys( sc );
|
check_enosys( sc );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Fri May 24 11:05:06 1996
|
|||||||
Init: sec (0), nsec (0) remaining
|
Init: sec (0), nsec (0) remaining
|
||||||
Init: nanosleep - 1.35 seconds
|
Init: nanosleep - 1.35 seconds
|
||||||
Fri May 24 11:05:07 1996
|
Fri May 24 11:05:07 1996
|
||||||
clock_gettime - CLOCK_THREAD_CPUTIME -- ENOSYS
|
clock_gettime - CLOCK_THREAD_CPUTIME_ID -- ENOSYS
|
||||||
clock_settime - CLOCK_PROCESS_CPUTIME -- ENOSYS
|
clock_settime - CLOCK_PROCESS_CPUTIME_ID -- ENOSYS
|
||||||
clock_settime - CLOCK_THREAD_CPUTIME -- ENOSYS
|
clock_settime - CLOCK_THREAD_CPUTIME_ID -- ENOSYS
|
||||||
*** END OF POSIX CLOCK TEST ***
|
*** END OF POSIX CLOCK TEST ***
|
||||||
|
|||||||
Reference in New Issue
Block a user