mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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:
parent
c883c3f6dd
commit
d1de009bc2
2 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue