arch/spinlock: implement the default test-and-set semantics

use the default testset implement on single core platform
that does not support test-and-set, more flexibility for
SMP drivers(using spinlock) if configured in a single-core mode.

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2020-12-30 14:24:51 +08:00
committed by Xiang Xiao
parent 7592fc17d3
commit 1241f910ce
2 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -232,7 +232,6 @@ menu "Tasks and Scheduling"
config SPINLOCK
bool "Support Spinlocks"
default n
depends on ARCH_HAVE_TESTSET
---help---
Enables support for spinlocks. Spinlocks are used primarily for
synchronization in SMP configurations but are available for general
@@ -275,6 +274,7 @@ config SMP
bool "Symmetric Multi-Processing (SMP)"
default n
depends on ARCH_HAVE_MULTICPU
depends on ARCH_HAVE_TESTSET
select SPINLOCK
select SCHED_RESUMESCHEDULER
select IRQCOUNT