Revert "kernel/spinlock: Fix SPIN_VALIDATE in ISRs"
This reverts commit 93dc7e7438
.
This PR introduced 2 regressions in main CI:
71977 & 71978
Let's revert it by now to get main's CI passing again.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
ea26bcf8d3
commit
c05cba682b
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#include <kernel_internal.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/spinlock.h>
|
#include <zephyr/spinlock.h>
|
||||||
|
|
||||||
bool z_spin_lock_valid(struct k_spinlock *l)
|
bool z_spin_lock_valid(struct k_spinlock *l)
|
||||||
|
@ -20,17 +20,10 @@ bool z_spin_lock_valid(struct k_spinlock *l)
|
||||||
|
|
||||||
bool z_spin_unlock_valid(struct k_spinlock *l)
|
bool z_spin_unlock_valid(struct k_spinlock *l)
|
||||||
{
|
{
|
||||||
uintptr_t tcpu = l->thread_cpu;
|
if (l->thread_cpu != (_current_cpu->id | (uintptr_t)_current)) {
|
||||||
|
|
||||||
l->thread_cpu = 0;
|
|
||||||
|
|
||||||
if (arch_is_in_isr() && _current->base.thread_state & _THREAD_DUMMY) {
|
|
||||||
/* Edge case where an ISR aborted _current */
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (tcpu != (_current_cpu->id | (uintptr_t)_current)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
l->thread_cpu = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue