Merge branch 'bugfix/spinlock_perf' into 'master'
freertos: Remove either one or two assertions from "fast path" of vPortCPUReleaseMutex() See merge request idf/esp-idf!2873
This commit is contained in:
commit
1c7a8b3b71
1 changed files with 3 additions and 5 deletions
|
@ -155,17 +155,15 @@ static inline void PORTMUX_RELEASE_MUX_FN_NAME(portMUX_TYPE *mux) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert(coreID == mux->owner); // This is a mutex we didn't lock, or it's corrupt
|
assert(coreID == mux->owner); // This is a mutex we didn't lock, or it's corrupt
|
||||||
assert(mux->count > 0); // Indicates memory corruption
|
|
||||||
assert(mux->count < 0x100); // Indicates memory corruption
|
|
||||||
|
|
||||||
mux->count--;
|
mux->count--;
|
||||||
if(mux->count == 0) {
|
if(mux->count == 0) {
|
||||||
mux->owner = portMUX_FREE_VAL;
|
mux->owner = portMUX_FREE_VAL;
|
||||||
}
|
} else {
|
||||||
|
assert(mux->count < 0x100); // Indicates memory corruption
|
||||||
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG_RECURSIVE
|
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG_RECURSIVE
|
||||||
else {
|
|
||||||
ets_printf("Recursive unlock: count=%d last locked %s line %d, curr %s line %d\n", mux->count, lastLockedFn, lastLockedLine, fnName, line);
|
ets_printf("Recursive unlock: count=%d last locked %s line %d, curr %s line %d\n", mux->count, lastLockedFn, lastLockedLine, fnName, line);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
#endif //!CONFIG_FREERTOS_UNICORE
|
#endif //!CONFIG_FREERTOS_UNICORE
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue