diff options
-rw-r--r-- | cpukit/ChangeLog | 7 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/coremutex.h | 4 | ||||
-rw-r--r-- | cpukit/score/inline/rtems/score/threadmp.inl | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 181e4803bc..daecb4d709 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2011-11-09 Werner Almesberger <werner@almesberger.net> + + PR 1957/cpukit + * score/include/rtems/score/coremutex.h, + score/inline/rtems/score/threadmp.inl: Add parentheses to protect + macro arguments. + 2011-11-07 Ralf Corsepius <ralf.corsepius@rtems.org> PR 1952/cpukit diff --git a/cpukit/score/include/rtems/score/coremutex.h b/cpukit/score/include/rtems/score/coremutex.h index 43ed77694d..dd4935dcd5 100644 --- a/cpukit/score/include/rtems/score/coremutex.h +++ b/cpukit/score/include/rtems/score/coremutex.h @@ -374,8 +374,8 @@ void _CORE_mutex_Seize_interrupt_blocking( INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE \ ); \ } \ - if ( _CORE_mutex_Seize_interrupt_trylock( _the_mutex, &_level ) ) { \ - if ( !_wait ) { \ + if ( _CORE_mutex_Seize_interrupt_trylock( _the_mutex, &(_level) ) ) { \ + if ( !(_wait) ) { \ _ISR_Enable( _level ); \ _Thread_Executing->Wait.return_code = \ CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT; \ diff --git a/cpukit/score/inline/rtems/score/threadmp.inl b/cpukit/score/inline/rtems/score/threadmp.inl index 648ed0e1d2..7599f37503 100644 --- a/cpukit/score/inline/rtems/score/threadmp.inl +++ b/cpukit/score/inline/rtems/score/threadmp.inl @@ -38,7 +38,7 @@ * _MPCI_Receive_server_tcb until it is used. */ #define _Thread_MP_Is_receive(_the_thread) \ - (_the_thread == _MPCI_Receive_server_tcb) + ((_the_thread) == _MPCI_Receive_server_tcb) /** * This routine frees a proxy control block to the |