summaryrefslogtreecommitdiffstats
path: root/c/src/tests/psxtests/psx01/init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-09-05 20:03:19 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-09-05 20:03:19 +0000
commitf254b93fd893847fbcd9edd34252e262f8a10a64 (patch)
treebbad6a3712ddd0284424a210a68cfceda84d12a7 /c/src/tests/psxtests/psx01/init.c
parentnew file to support GNU Ada. (diff)
downloadrtems-f254b93fd893847fbcd9edd34252e262f8a10a64.tar.bz2
nanosleep no longer consider a negative value of tv_sec to be an error.
Instead it is an indication of a request for a small delay.
Diffstat (limited to '')
-rw-r--r--c/src/tests/psxtests/psx01/init.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/c/src/tests/psxtests/psx01/init.c b/c/src/tests/psxtests/psx01/init.c
index 845cf7cc3e..a46554ce67 100644
--- a/c/src/tests/psxtests/psx01/init.c
+++ b/c/src/tests/psxtests/psx01/init.c
@@ -113,12 +113,6 @@ void *POSIX_Init(
assert( status == -1 );
assert( errno == EINVAL );
- tv.tv_sec = -1;
- puts( "Init: nanosleep - EAGAIN (negative seconds)" );
- status = nanosleep ( &tv, &tr );
- assert( status == -1 );
- assert( errno == EAGAIN );
-
tv.tv_sec = 0;
tv.tv_nsec = TOD_NANOSECONDS_PER_SECOND * 2;
puts( "Init: nanosleep - EINVAL (too many nanoseconds)" );
@@ -126,6 +120,13 @@ void *POSIX_Init(
assert( status == -1 );
assert( errno == EINVAL );
+ /* this is actually a small delay or yield */
+ tv.tv_sec = -1;
+ tv.tv_nsec = 0;
+ puts( "Init: nanosleep - negative seconds small delay " );
+ status = nanosleep ( &tv, &tr );
+ assert( !status );
+
/* use nanosleep to yield */
tv.tv_sec = 0;