mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-02-05 05:01:38 +00:00
score: Improve _ISR_lock_Initialize()
Use do {} while (0) approach to avoid stray ';'.
Update #4957 and #5038.
This commit is contained in:
@@ -82,8 +82,8 @@
|
||||
* - Check that RTEMS_INTERRUPT_LOCK_INITIALIZER() expands to an empty
|
||||
* structure initializer.
|
||||
*
|
||||
* - Check that rtems_interrupt_lock_initialize() expands to white space
|
||||
* only.
|
||||
* - Check that rtems_interrupt_lock_initialize() expands to a code block
|
||||
* which marks the second parameter as used.
|
||||
*
|
||||
* - Check that rtems_interrupt_lock_acquire_isr() expands to a code block
|
||||
* which marks the second parameter as used.
|
||||
@@ -139,10 +139,11 @@ static void RtemsIntrValIntrNonSmp_Action_0( void )
|
||||
T_true( IsEqualIgnoreWhiteSpace( s, "{}" ) );
|
||||
|
||||
/*
|
||||
* Check that rtems_interrupt_lock_initialize() expands to white space only.
|
||||
* Check that rtems_interrupt_lock_initialize() expands to a code block which
|
||||
* marks the second parameter as used.
|
||||
*/
|
||||
s = RTEMS_XSTRING( rtems_interrupt_lock_initialize( x, y ) );
|
||||
T_true( IsEqualIgnoreWhiteSpace( s, "(void)y;" ) );
|
||||
T_true( IsEqualIgnoreWhiteSpace( s, "do{(void)y;}while(0)" ) );
|
||||
|
||||
/*
|
||||
* Check that rtems_interrupt_lock_acquire_isr() expands to a code block
|
||||
|
||||
Reference in New Issue
Block a user