forked from Imagelibrary/rtems
Fix building with RTEMS_DEBUG.
This commit is contained in:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user