sched: inline enter_critical_section

Inline enter_critical_section function calls in performance-critical
paths to reduce function call overhead while maintaining consistent
semantics, improving overall system latency and responsiveness in
real-time scenarios.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2026-01-24 18:21:47 +08:00 committed by Xiang Xiao
parent c883c3f6dd
commit d1de009bc2
2 changed files with 3 additions and 1 deletions

View file

@ -39,6 +39,7 @@
#include <sys/poll.h>
#include <nuttx/sched.h>
#include <nuttx/spinlock.h>
/****************************************************************************
* Private Types
@ -129,7 +130,7 @@ static size_t performance_gettime(FAR struct performance_time_s *result)
}
/****************************************************************************
* Pthread swtich performance
* Pthread switch performance
****************************************************************************/
static FAR void *pthread_switch_task(FAR void *arg)

View file

@ -27,6 +27,7 @@
#include <nuttx/config.h>
#include <nuttx/arch.h>
#include <nuttx/wdog.h>
#include <nuttx/spinlock.h>
#include <assert.h>
#include <pthread.h>