posix: Use RTEMS_POSIX_API in clock_nanosleep()

It is only possible to get interrupted by a POSIX signal if
RTEMS_POSIX_API is defined.
This commit is contained in:
Sebastian Huber
2021-05-17 17:29:36 +02:00
parent 815a94326c
commit 9918735448
+5
View File
@@ -97,6 +97,7 @@ int clock_nanosleep(
}
if ( rmtp != NULL && ( flags & TIMER_ABSTIME ) == 0 ) {
#if defined( RTEMS_POSIX_API )
if ( eno == EINTR ) {
struct timespec actual_end;
@@ -110,6 +111,10 @@ int clock_nanosleep(
} else {
_Timespec_Set_to_zero( rmtp );
}
#else
_Assert( eno != EINTR );
_Timespec_Set_to_zero( rmtp );
#endif
}
return eno;