diff options
Diffstat (limited to 'cpukit/posix/src/nanosleep.c')
-rw-r--r-- | cpukit/posix/src/nanosleep.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c index cd66175df7..e83f1c8277 100644 --- a/cpukit/posix/src/nanosleep.c +++ b/cpukit/posix/src/nanosleep.c @@ -93,11 +93,15 @@ int nanosleep( _Timespec_From_ticks( ticks, rmtp ); /* - * If there is time remaining, then we were interrupted by a signal. + * Only when POSIX is enabled, can a sleep be interrupted. */ - - if ( ticks ) - rtems_set_errno_and_return_minus_one( EINTR ); + #if defined(RTEMS_POSIX_API) + /* + * If there is time remaining, then we were interrupted by a signal. + */ + if ( ticks ) + rtems_set_errno_and_return_minus_one( EINTR ); + #endif } return 0; |