summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/sigsuspend.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-09-30 16:10:45 +1000
committerChris Johns <chrisj@rtems.org>2013-09-30 16:10:45 +1000
commit85c855af7e5b368edf72f55436a01f07beef37f3 (patch)
tree6fd19927bc58607265080e4420cb1c8836d61837 /cpukit/posix/src/sigsuspend.c
parentleon3/.../ckinit.c: Fix missing prototype warnings (diff)
downloadrtems-85c855af7e5b368edf72f55436a01f07beef37f3.tar.bz2
Fix building with RTEMS_DEBUG.
Diffstat (limited to 'cpukit/posix/src/sigsuspend.c')
-rw-r--r--cpukit/posix/src/sigsuspend.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/cpukit/posix/src/sigsuspend.c b/cpukit/posix/src/sigsuspend.c
index ab935d1fe1..4abd89cc32 100644
--- a/cpukit/posix/src/sigsuspend.c
+++ b/cpukit/posix/src/sigsuspend.c
@@ -33,6 +33,9 @@ int sigsuspend(
{
sigset_t saved_signals_blocked;
sigset_t current_unblocked_signals;
+#if defined(RTEMS_DEBUG)
+ int status;
+#endif
/*
* We use SIG_BLOCK and not SIG_SETMASK because there may be
@@ -40,13 +43,24 @@ int sigsuspend(
* We want the signals to be caught inside sigtimedwait.
*
* We ignore the return status codes because sigsuspend() is
- * defined to either terminate or return -1 with errno set to
+ * defined to either terminate or return -1 with errno set to
* EINTR.
*/
- (void) sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
+#if defined(RTEMS_DEBUG)
+ status =
+#else
+ (void)
+#endif
+ sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
current_unblocked_signals = ~(*sigmask);
- (void) sigtimedwait( &current_unblocked_signals, NULL, NULL );
+
+ #if defined(RTEMS_DEBUG)
+ status =
+#else
+ (void)
+#endif
+ sigtimedwait( &current_unblocked_signals, NULL, NULL );
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );