hujun260 opened a new pull request, #14578:
URL: https://github.com/apache/nuttx/pull/14578
## Summary
1 Accelerated the implementation of sched_lock, remove
enter_critical_section in sched_lock and
only enter_critical_section when task scheduling is required.
2 we add sched_lock_wo_note/sched_unlock_wo_note and it does not perform
instrumentation logic
3 We aim to replace big locks with smaller ones. So we will use
spin_lock_irqsave extensively to
replace enter_critical_section in the subsequent process. We imitate the
implementation of Linux
by adding sched_lock to spin_lock_irqsave in order to address scenarios
where sem_post occurs
within spin_lock_irqsave, which can lead to spinlock failures and
deadlocks.
## Impact
spinlock and sched_lock
## Testing
**Build Host:**
* OS: Ubuntu 20.04
* CPU: x86_64
* Compiler: GCC 9.4.0
Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
-machine virt,virtualization=on,gic-version=3 \
-net none -chardev stdio,id=con,mux=on -serial chardev:con \
-mon chardev=con,mode=readline -kernel ./nuttx
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]