File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
portable/ThirdParty/GCC/RP2040/include Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ static inline void vPortRecursiveLock( BaseType_t xCoreID,
227227 if ( ucOwnedByCore [ xCoreID ][ ulLockNum ] )
228228 {
229229 configASSERT ( ucRecursionCountByLock [ ulLockNum ] != 255u );
230- ucRecursionCountByLock [ ulLockNum ]++ ;
230+ ucRecursionCountByLock [ ulLockNum ] = ucRecursionCountByLock [ ulLockNum ] + 1 ;
231231 return ;
232232 }
233233 spin_lock_unsafe_blocking (pxSpinLock );
@@ -241,7 +241,9 @@ static inline void vPortRecursiveLock( BaseType_t xCoreID,
241241 configASSERT ( ( ucOwnedByCore [ xCoreID ] [ulLockNum ] ) != 0 );
242242 configASSERT ( ucRecursionCountByLock [ ulLockNum ] != 0 );
243243
244- if ( !-- ucRecursionCountByLock [ ulLockNum ] )
244+ uint8_t uc = ucRecursionCountByLock [ ulLockNum ] - 1 ;
245+ ucRecursionCountByLock [ulLockNum ] = uc ;
246+ if (uc == 0U )
245247 {
246248 ucOwnedByCore [ xCoreID ] [ ulLockNum ] = 0 ;
247249 spin_unlock_unsafe (pxSpinLock );
You can’t perform that action at this time.
0 commit comments