[BUG] [spinlock] spin_lock should imply sched_lock to avoid dead lock
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
### Description / Steps to reproduce the issue
Task A takes a spinlock, however it may still preempted by higher priority task, that's very dangerous! If the higher priority task acquire the same spinlock, then dead lock occurs.
spin_lock api behave like linux's spinlock, that imply preempt_disable. That's different api with spin_lock_irqsave.
If there are no objections, I will fix this bug.
### On which OS does this issue occur?
[OS: Linux]
### What is the version of your OS?
ubuntu 20.04
### NuttX Version
master
### Issue Architecture
[Arch: arm], [Arch: all]
### Issue Area
[Area: Kernel]
### Host information
_No response_
### Verification
- [x] I have verified before submitting the report.
Contributor guide
Assessment
This issue has not been assessed yet.