diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-11-09 18:44:01 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-11-09 18:44:01 +0000 |
commit | e3fbffb712595eedbea0abb2c7d66bea3399f9f4 (patch) | |
tree | f1c281b66b84c7f743ba2d3246a6bf8d71a9d03c | |
parent | 2011-11-09 Werner Almesberger <werner@almesberger.net> (diff) | |
download | rtems-e3fbffb712595eedbea0abb2c7d66bea3399f9f4.tar.bz2 |
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.
-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 4f82858e09..55a58b9888 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 712b35c7eb..ba2ae02782 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 |