mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 03:25:08 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user