1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 09:16:01 +03:00

Fix tests

This commit is contained in:
Konstantin (DigitalEntity) Sharlaimov 2020-03-31 10:16:34 +02:00
parent eb2b9d7947
commit 36b06a23c5

View file

@ -44,5 +44,10 @@ static inline uint8_t __basepriSetMemRetVal(uint8_t prio)
// Run block with elevated BASEPRI (using BASEPRI_MAX), restoring BASEPRI on exit. All exit paths are handled
// Full memory barrier is placed at start and exit of block
#ifdef UNIT_TEST
#define ATOMIC_BLOCK(prio) {}
#else
#define ATOMIC_BLOCK(prio) for ( uint8_t __basepri_save __attribute__((__cleanup__(__basepriRestoreMem))) = __get_BASEPRI(), \
__ToDo = __basepriSetMemRetVal((prio) << (8U - __NVIC_PRIO_BITS)); __ToDo ; __ToDo = 0 )
#endif // UNIT_TEST