Changeset 41310c02 in rtems
- Timestamp:
- 01/18/19 12:16:29 (5 years ago)
- Branches:
- 5, master
- Children:
- 926ed2b0
- Parents:
- b5bdecf
- git-author:
- Sebastian Huber <sebastian.huber@…> (01/18/19 12:16:29)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (01/18/19 12:33:18)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/include/rtems/rtems/intr.h
rb5bdecf r41310c02 343 343 * @see rtems_interrupt_lock_release_isr(). 344 344 */ 345 #define rtems_interrupt_lock_acquire_isr( _lock, _lock_context ) \ 346 _ISR_lock_Acquire( _lock, _lock_context ) 345 #if defined(RTEMS_SMP) 346 #define rtems_interrupt_lock_acquire_isr( _lock, _lock_context ) \ 347 _SMP_lock_Acquire( \ 348 &( _lock )->Lock, \ 349 &( _lock_context )->Lock_context \ 350 ) 351 #else 352 #define rtems_interrupt_lock_acquire_isr( _lock, _lock_context ) \ 353 do { (void) _lock_context; } while ( 0 ) 354 #endif 347 355 348 356 /** … … 359 367 * @see rtems_interrupt_lock_acquire_isr(). 360 368 */ 361 #define rtems_interrupt_lock_release_isr( _lock, _lock_context ) \ 362 _ISR_lock_Release( _lock, _lock_context ) 369 #if defined(RTEMS_SMP) 370 #define rtems_interrupt_lock_release_isr( _lock, _lock_context ) \ 371 _SMP_lock_Release( \ 372 &( _lock )->Lock, \ 373 &( _lock_context )->Lock_context \ 374 ) 375 #else 376 #define rtems_interrupt_lock_release_isr( _lock, _lock_context ) \ 377 do { (void) _lock_context; } while ( 0 ) 378 #endif 363 379 364 380 /** @} */ -
cpukit/include/rtems/score/isrlock.h
rb5bdecf r41310c02 8 8 9 9 /* 10 * Copyright (c) 2013 -2015embedded brains GmbH. All rights reserved.10 * Copyright (c) 2013, 2019 embedded brains GmbH. All rights reserved. 11 11 * 12 12 * embedded brains GmbH … … 268 268 #if defined( RTEMS_SMP ) 269 269 #define _ISR_lock_Acquire( _lock, _context ) \ 270 _SMP_lock_Acquire( \ 271 &( _lock )->Lock, \ 272 &( _context )->Lock_context \ 273 ) 270 do { \ 271 _Assert( _ISR_Get_level() != 0 ); \ 272 _SMP_lock_Acquire( \ 273 &( _lock )->Lock, \ 274 &( _context )->Lock_context \ 275 ); \ 276 } while ( 0 ) 274 277 #else 275 278 #define _ISR_lock_Acquire( _lock, _context ) \ 276 (void) _context;279 do { (void) _context; } while ( 0 ) 277 280 #endif 278 281 … … 297 300 #else 298 301 #define _ISR_lock_Release( _lock, _context ) \ 299 (void) _context;302 do { (void) _context; } while ( 0 ) 300 303 #endif 301 304 … … 307 310 #if defined( RTEMS_SMP ) 308 311 #define _ISR_lock_Acquire_inline( _lock, _context ) \ 309 _SMP_lock_Acquire_inline( \ 310 &( _lock )->Lock, \ 311 &( _context )->Lock_context \ 312 ) 312 do { \ 313 _Assert( _ISR_Get_level() != 0 ); \ 314 _SMP_lock_Acquire_inline( \ 315 &( _lock )->Lock, \ 316 &( _context )->Lock_context \ 317 ); \ 318 } while ( 0 ) 313 319 #else 314 320 #define _ISR_lock_Acquire_inline( _lock, _context ) \ 315 (void) _context;321 do { (void) _context; } while ( 0 ) 316 322 #endif 317 323 … … 329 335 #else 330 336 #define _ISR_lock_Release_inline( _lock, _context ) \ 331 (void) _context;337 do { (void) _context; } while ( 0 ) 332 338 #endif 333 339 -
testsuites/sptests/sp37/init.c
rb5bdecf r41310c02 179 179 size_t i; 180 180 const uint8_t *initialized_bytes; 181 ISR_Level interrupt_level; 181 182 182 183 memset( &container, 0xff, sizeof( container ) ); … … 204 205 rtems_test_assert( normal_interrupt_level == _ISR_Get_level() ); 205 206 207 #if defined(RTEMS_DEBUG) 208 _ISR_lock_ISR_disable( &lock_context ); 209 #endif 210 interrupt_level = _ISR_Get_level(); 206 211 _ISR_lock_Acquire( &container.lock, &lock_context ); 212 rtems_test_assert( interrupt_level == _ISR_Get_level() ); 213 #if !defined(RTEMS_DEBUG) 207 214 rtems_test_assert( normal_interrupt_level == _ISR_Get_level() ); 215 #endif 208 216 _ISR_lock_Release( &container.lock, &lock_context ); 217 rtems_test_assert( interrupt_level == _ISR_Get_level() ); 218 #if defined(RTEMS_DEBUG) 219 _ISR_lock_ISR_enable( &lock_context ); 220 #endif 209 221 210 222 rtems_test_assert( normal_interrupt_level == _ISR_Get_level() );
Note: See TracChangeset
for help on using the changeset viewer.