mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
Feature: implement ticket spinlock
test config: ./tools/configure.sh -l qemu-armv8a:nsh_smp Pass ostest No matter big-endian or little-endian, ticket spinlock only check the next and the owner is equal or not. If they are equal, it means there is a task hold the lock or lock is free. Signed-off-by: TaiJu Wu <tjwu1217@gmail.com> Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
This commit is contained in:
@@ -120,7 +120,7 @@ static bool irq_waitlock(int cpu)
|
||||
* for the deadlock condition.
|
||||
*/
|
||||
|
||||
while (spin_trylock_wo_note(&g_cpu_irqlock) == SP_LOCKED)
|
||||
while (!spin_trylock_wo_note(&g_cpu_irqlock))
|
||||
{
|
||||
/* Is a pause request pending? */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user