Ignore:
Timestamp:
Sep 5, 1996, 8:03:19 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
9a5cbef0
Parents:
62bf651f
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/psxtests/psx01/init.c

    r62bf651f rf254b93f  
    114114  assert( errno == EINVAL );
    115115
    116   tv.tv_sec = -1;
    117   puts( "Init: nanosleep - EAGAIN (negative seconds)" );
    118   status = nanosleep ( &tv, &tr );
    119   assert( status == -1 );
    120   assert( errno == EAGAIN );
    121 
    122116  tv.tv_sec = 0;
    123117  tv.tv_nsec = TOD_NANOSECONDS_PER_SECOND * 2;
     
    126120  assert( status == -1 );
    127121  assert( errno == EINVAL );
     122
     123  /* this is actually a small delay or yield */
     124  tv.tv_sec = -1;
     125  tv.tv_nsec = 0;
     126  puts( "Init: nanosleep - negative seconds small delay " );
     127  status = nanosleep ( &tv, &tr );
     128  assert( !status );
    128129
    129130  /* use nanosleep to yield */
Note: See TracChangeset for help on using the changeset viewer.