forked from Imagelibrary/rtems
2009-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
* psxtests/psxclock/init.c, psxtests/psxclock/psxclock.scn: Add test case for nanosleep of a very small delay which mathematically is less than a clock tick.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2009-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* psxtests/psxclock/init.c, psxtests/psxclock/psxclock.scn: Add test
|
||||||
|
case for nanosleep of a very small delay which mathematically is less
|
||||||
|
than a clock tick.
|
||||||
|
|
||||||
2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* configure.ac: Some POSIX tests exercise functionality which is
|
* configure.ac: Some POSIX tests exercise functionality which is
|
||||||
|
|||||||
@@ -155,6 +155,15 @@ rtems_task Init(
|
|||||||
rtems_test_assert( sc == -1 );
|
rtems_test_assert( sc == -1 );
|
||||||
rtems_test_assert( errno == EINVAL );
|
rtems_test_assert( errno == EINVAL );
|
||||||
|
|
||||||
|
/* this is actually a small delay */
|
||||||
|
tv.tv_sec = 0;
|
||||||
|
tv.tv_nsec = 1;
|
||||||
|
puts( "Init: nanosleep - delay so small results in one tick" );
|
||||||
|
sc = nanosleep ( &tv, &tr );
|
||||||
|
rtems_test_assert( !sc );
|
||||||
|
rtems_test_assert( !tr.tv_sec );
|
||||||
|
rtems_test_assert( !tr.tv_nsec );
|
||||||
|
|
||||||
/* use nanosleep to yield */
|
/* use nanosleep to yield */
|
||||||
|
|
||||||
tv.tv_sec = 0;
|
tv.tv_sec = 0;
|
||||||
@@ -200,7 +209,7 @@ rtems_task Init(
|
|||||||
rtems_test_assert( !sc );
|
rtems_test_assert( !sc );
|
||||||
printf( ctime( &tv.tv_sec ) );
|
printf( ctime( &tv.tv_sec ) );
|
||||||
|
|
||||||
puts( "" );
|
empty_line();
|
||||||
puts( "clock_gettime - CLOCK_THREAD_CPUTIME -- ENOSYS" );
|
puts( "clock_gettime - CLOCK_THREAD_CPUTIME -- ENOSYS" );
|
||||||
#if defined(_POSIX_THREAD_CPUTIME)
|
#if defined(_POSIX_THREAD_CPUTIME)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ Init: seconds remaining (0)
|
|||||||
Init: nanosleep - EINVAL (NULL time)
|
Init: nanosleep - EINVAL (NULL time)
|
||||||
Init: nanosleep - EINVAL (too many nanoseconds)
|
Init: nanosleep - EINVAL (too many nanoseconds)
|
||||||
Init: nanosleep - negative seconds small delay
|
Init: nanosleep - negative seconds small delay
|
||||||
|
Init: nanosleep - delay so small results in one tick
|
||||||
Init: nanosleep - yield with remaining
|
Init: nanosleep - yield with remaining
|
||||||
Init: nanosleep - yield with NULL time remaining
|
Init: nanosleep - yield with NULL time remaining
|
||||||
Init: nanosleep - 1.05 seconds
|
Init: nanosleep - 1.05 seconds
|
||||||
|
|||||||
Reference in New Issue
Block a user