diff --git a/drivers/note/note_driver.c b/drivers/note/note_driver.c index 11e6aed7a4..1a8da44333 100644 --- a/drivers/note/note_driver.c +++ b/drivers/note/note_driver.c @@ -79,8 +79,8 @@ ((drv)->ops->cpu_resume && ((drv)->ops->cpu_resume(drv, tcb, cpu), true)) #define note_cpu_resumed(drv, tcb) \ ((drv)->ops->cpu_resumed && ((drv)->ops->cpu_resumed(drv, tcb), true)) -#define note_premption(drv, tcb, locked) \ - ((drv)->ops->premption && ((drv)->ops->premption(drv, tcb, locked), true)) +#define note_preemption(drv, tcb, locked) \ + ((drv)->ops->preemption && ((drv)->ops->preemption(drv, tcb, locked), true)) #define note_csection(drv, tcb, enter) \ ((drv)->ops->csection && ((drv)->ops->csection(drv, tcb, enter), true)) #define note_spinlock(drv, tcb, spinlock, type) \ @@ -1051,7 +1051,7 @@ void sched_note_cpu_resumed(FAR struct tcb_s *tcb) #endif /* CONFIG_SCHED_INSTRUMENTATION_SWITCH */ #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION -void sched_note_premption(FAR struct tcb_s *tcb, bool locked) +void sched_note_preemption(FAR struct tcb_s *tcb, bool locked) { struct note_preempt_s note; FAR struct note_driver_s **driver; @@ -1064,7 +1064,7 @@ void sched_note_premption(FAR struct tcb_s *tcb, bool locked) continue; } - if (note_premption(*driver, tcb, locked)) + if (note_preemption(*driver, tcb, locked)) { continue; } diff --git a/drivers/note/notelog_driver.c b/drivers/note/notelog_driver.c index 2ef0f5885a..f0839f0f22 100644 --- a/drivers/note/notelog_driver.c +++ b/drivers/note/notelog_driver.c @@ -61,8 +61,8 @@ static void notelog_cpu_resumed(FAR struct note_driver_s *drv, # endif #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION -static void notelog_premption(FAR struct note_driver_s *drv, - FAR struct tcb_s *tcb, bool locked); +static void notelog_preemption(FAR struct note_driver_s *drv, + FAR struct tcb_s *tcb, bool locked); #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION static void notelog_csection(FAR struct note_driver_s *drv, @@ -103,7 +103,7 @@ static const struct note_driver_ops_s g_notelog_ops = # endif #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION - notelog_premption, /* premption */ + notelog_preemption, /* preemption */ #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION notelog_csection, /* csection */ @@ -255,8 +255,8 @@ static void notelog_cpu_resumed(FAR struct note_driver_s *drv, #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION -static void notelog_premption(FAR struct note_driver_s *drv, - FAR struct tcb_s *tcb, bool locked) +static void notelog_preemption(FAR struct note_driver_s *drv, + FAR struct tcb_s *tcb, bool locked) { #ifdef CONFIG_SMP syslog(LOG_INFO, "CPU%d: Task %s TCB@%p preemption %s\n", diff --git a/drivers/note/notesnap_driver.c b/drivers/note/notesnap_driver.c index 636fc37f69..50b5182761 100644 --- a/drivers/note/notesnap_driver.c +++ b/drivers/note/notesnap_driver.c @@ -86,8 +86,8 @@ static void notesnap_cpu_resumed(FAR struct note_driver_s *drv, # endif #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION -static void notesnap_premption(FAR struct note_driver_s *drv, - FAR struct tcb_s *tcb, bool locked); +static void notesnap_preemption(FAR struct note_driver_s *drv, + FAR struct tcb_s *tcb, bool locked); #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION static void notesnap_csection(FAR struct note_driver_s *drv, @@ -133,7 +133,7 @@ static const struct note_driver_ops_s g_notesnap_ops = # endif #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION - notesnap_premption, + notesnap_preemption, #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION notesnap_csection, @@ -302,8 +302,8 @@ static void notesnap_cpu_resumed(FAR struct note_driver_s *drv, #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION -static void notesnap_premption(FAR struct note_driver_s *drv, - FAR struct tcb_s *tcb, bool locked) +static void notesnap_preemption(FAR struct note_driver_s *drv, + FAR struct tcb_s *tcb, bool locked) { notesnap_common(drv, tcb, locked ? NOTE_PREEMPT_LOCK : NOTE_PREEMPT_UNLOCK, 0); diff --git a/drivers/segger/note_sysview.c b/drivers/segger/note_sysview.c index 1b5b15baf6..17424c4bd5 100644 --- a/drivers/segger/note_sysview.c +++ b/drivers/segger/note_sysview.c @@ -112,7 +112,7 @@ static const struct note_driver_ops_s g_note_sysview_ops = # endif #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION - NULL, /* premption */ + NULL, /* preemption */ #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION NULL, /* csection */ diff --git a/include/nuttx/note/note_driver.h b/include/nuttx/note/note_driver.h index 4e103b31ff..88de1d279e 100644 --- a/include/nuttx/note/note_driver.h +++ b/include/nuttx/note/note_driver.h @@ -71,8 +71,8 @@ struct note_driver_ops_s # endif #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION - CODE void (*premption)(FAR struct note_driver_s *drv, - FAR struct tcb_s *tcb, bool locked); + CODE void (*preemption)(FAR struct note_driver_s *drv, + FAR struct tcb_s *tcb, bool locked); #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION CODE void (*csection)(FAR struct note_driver_s *drv, diff --git a/include/nuttx/sched_note.h b/include/nuttx/sched_note.h index 13ad52cb2d..f1b04b57d7 100644 --- a/include/nuttx/sched_note.h +++ b/include/nuttx/sched_note.h @@ -630,9 +630,9 @@ void sched_note_cpu_resumed(FAR struct tcb_s *tcb); #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION -void sched_note_premption(FAR struct tcb_s *tcb, bool locked); +void sched_note_preemption(FAR struct tcb_s *tcb, bool locked); #else -# define sched_note_premption(t,l) +# define sched_note_preemption(t,l) #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION diff --git a/sched/Kconfig b/sched/Kconfig index ac4f703ca6..74483c5bf7 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -1252,7 +1252,7 @@ config SCHED_INSTRUMENTATION_PREEMPTION Enables additional hooks for changes to pre-emption state. Board- specific logic must provide this additional logic. - void sched_note_premption(FAR struct tcb_s *tcb, bool state); + void sched_note_preemption(FAR struct tcb_s *tcb, bool state); config SCHED_INSTRUMENTATION_CSECTION bool "Critical section monitor hooks" diff --git a/sched/sched/sched_lock.c b/sched/sched/sched_lock.c index 36b9ab7c87..d825e09f14 100644 --- a/sched/sched/sched_lock.c +++ b/sched/sched/sched_lock.c @@ -110,7 +110,7 @@ int sched_lock(void) nxsched_critmon_preemption(rtcb, true, return_address(0)); #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION - sched_note_premption(rtcb, true); + sched_note_preemption(rtcb, true); #endif } @@ -164,7 +164,7 @@ int sched_lock(void) nxsched_critmon_preemption(rtcb, true, return_address(0)); #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION - sched_note_premption(rtcb, true); + sched_note_preemption(rtcb, true); #endif } } diff --git a/sched/sched/sched_unlock.c b/sched/sched/sched_unlock.c index 9b324fe6e3..23def4bf25 100644 --- a/sched/sched/sched_unlock.c +++ b/sched/sched/sched_unlock.c @@ -95,7 +95,7 @@ int sched_unlock(void) nxsched_critmon_preemption(rtcb, false, return_address(0)); #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION - sched_note_premption(rtcb, false); + sched_note_preemption(rtcb, false); #endif /* Release any ready-to-run tasks that have collected in @@ -220,7 +220,7 @@ int sched_unlock(void) nxsched_critmon_preemption(rtcb, false, return_address(0)); #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION - sched_note_premption(rtcb, false); + sched_note_preemption(rtcb, false); #endif /* Release any ready-to-run tasks that have collected in