mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-16 01:05:15 +08:00
Eight-core boot on SpacemiT K1 could stall with one CPU in the unlock LR/SC loop, two CPUs allocating tickets, and the remaining CPUs waiting for the scheduler lock. Replace LR/SC ticket allocation with amoadd.w.aqrl and release the lock with a halfword owner update. Order critical-section accesses after acquiring ownership and before releasing it. Verified eight-core boot on K1 with temporary diagnostics and reservation-clearing changes removed. Signed-off-by: GuEe-GUI <2991707448@qq.com>