diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-09-30 12:09:12 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-09-30 12:09:12 -0500 |
commit | abceda999dcd3908a68320444db6aa4dfa287573 (patch) | |
tree | eb09be023188886a157b3e101eb928d6e2ea47a2 | |
parent | libbsp/sparc/.../gnatcommon.c: Formatting (diff) | |
parent | Fix building with RTEMS_DEBUG. (diff) | |
download | rtems-abceda999dcd3908a68320444db6aa4dfa287573.tar.bz2 |
Merge branch 'master' into warnings
-rw-r--r-- | cpukit/posix/src/sigsuspend.c | 20 |
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( ¤t_unblocked_signals, NULL, NULL ); + + #if defined(RTEMS_DEBUG) + status = +#else + (void) +#endif + sigtimedwait( ¤t_unblocked_signals, NULL, NULL ); (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); |