Changeset 1314849 in rtems


Ignore:
Timestamp:
10/08/14 20:09:50 (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, master
Children:
60ec7a6
Parents:
81074900
git-author:
Joel Sherrill <joel.sherrill@…> (10/08/14 20:09:50)
git-committer:
Joel Sherrill <joel.sherrill@…> (10/09/14 15:11:58)
Message:

h8300/rtems/score/cpu.h: Fix macros to avoid warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/h8300/rtems/score/cpu.h

    r81074900 r1314849  
    638638 *  H8300 Specific Information:
    639639 *
    640  *  XXX
     640 *  TODO: As of 8 October 2014, this method is not implemented for the SX.
    641641 */
    642642
     
    650650  } while (0)
    651651#else
    652 #define _CPU_ISR_Disable( _isr_cookie ) (_isr_cookie) = 0
     652#define _CPU_ISR_Disable( _isr_cookie ) \
     653  do { \
     654    (_isr_cookie) = 0; \
     655  } while (0)
    653656#endif
    654657
     
    661664 *  H8300 Specific Information:
    662665 *
    663  *  XXX
     666 *  TODO: As of 8 October 2014, this method is not implemented for the SX.
    664667 */
    665668
     
    671674  } while (0)
    672675#else
    673 #define _CPU_ISR_Enable( _isr_cookie )
     676#define _CPU_ISR_Enable( _isr_cookie ) \
     677  do { \
     678    (_isr_cookie) = (_isr_cookie); \
     679  } while (0)
    674680#endif
    675681
     
    682688 *  H8300 Specific Information:
    683689 *
    684  *  XXX
     690 *  TODO: As of 8 October 2014, this method is not implemented for the SX.
    685691 */
    686692
     
    692698  } while (0)
    693699#else
    694 #define _CPU_ISR_Flash( _isr_cookie )
     700#define _CPU_ISR_Flash( _isr_cookie ) \
     701  do { \
     702    _CPU_ISR_Enable( _isr_cookie ); \
     703    _CPU_ISR_Disable( _isr_cookie ); \
     704  } while (0)
    695705#endif
    696706
     
    765775    else          (_the_context)->ccr = CPU_CCR_INTERRUPTS_ON; \
    766776    \
     777    (void) _is_fp; /* to eliminate set but not used warning */ \
    767778    _stack = ((uintptr_t)(_stack_base)) + (_size) - 4; \
    768779    *((proc_ptr *)(_stack)) = (_entry_point); \
Note: See TracChangeset for help on using the changeset viewer.