[rtems commit] posix: Use RTEMS_POSIX_API in clock_nanosleep()
Sebastian Huber
sebh at rtems.org
Mon May 17 15:30:15 UTC 2021
Module: rtems
Branch: master
Commit: 9918735448c84f402b561587db8afa840d00e31b
Changeset: http://git.rtems.org/rtems/commit/?id=9918735448c84f402b561587db8afa840d00e31b
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon May 17 16:46:12 2021 +0200
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.
---
cpukit/posix/src/clocknanosleep.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/cpukit/posix/src/clocknanosleep.c b/cpukit/posix/src/clocknanosleep.c
index 73b7d9c..951268bc 100644
--- a/cpukit/posix/src/clocknanosleep.c
+++ b/cpukit/posix/src/clocknanosleep.c
@@ -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;
More information about the vc
mailing list