From a4c22f5f321ab1ed240e402d0f4a4289fb796c32 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 9 Nov 2011 18:44:34 +0000 Subject: 2011-11-09 Werner Almesberger PR 1957/cpukit * score/include/rtems/score/coremutex.h, score/inline/rtems/score/threadmp.inl: Add parentheses to protect macro arguments. --- cpukit/ChangeLog | 7 +++++++ cpukit/score/include/rtems/score/coremutex.h | 4 ++-- 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 + + 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 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 -- cgit v1.2.3