#1466 closed defect (fixed)

Remove usleep from testsuites

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 4.10
Component: unspecified Version: 4.10
Severity: normal Keywords:
Cc: Blocked By:


usleep() has been removed from POSIX.1-2008/IEEE Std 1003.1-2008.

=> We should not rely upon usleep in RTEMS, anymore.

=> These files from the testsuites should be modified to meet POSIX.1-2008:

./samples/capture/init.c: usleep (1000000);
./psxtests/psxkey03/init.c: usleep(500000);
./psxtests/psxkey03/init.c: usleep(500000);
./psxtests/psxhdrs/timer07.c: result = usleep( usec );
./psxtests/psxstack01/init.c: usleep( 500000 );
./psxtests/psxsignal02/init.c: usleep(500000);
./psxtests/psxclock/psxclock.scn:Init: usleep - 1.35 seconds
./psxtests/psxclock/init.c: puts( "Init: usleep - 1.35 seconds" );
./psxtests/psxclock/init.c: useconds = usleep ( 1350000 );
./psxtests/psxclock/psxclock.doc: usleep
./psxtests/psxsignal03/init.c: usleep(500000);
./psxtests/psxsignal03/init.c: usleep(500000);
./psxtests/psxsignal03/init.c: usleep(500000);

Common advice is to replace usleep() with nanosleep()

Change History (2)

comment:1 Changed on Nov 11, 2009 at 11:21:36 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Addressed on head. Added psxusleep test to exercise code and modified all existing tests to use nanosleep instead.

comment:2 Changed on Oct 10, 2017 at 6:46:55 AM by Sebastian Huber

Component: testingunspecified
Note: See TracTickets for help on using tickets.