spelling: fix spelling typo premp -> preemp

Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
chao an 2024-11-25 17:23:43 +08:00 committed by Xiang Xiao
parent 6ffb001fdf
commit 24add5eeaf
4 changed files with 28 additions and 28 deletions

View file

@ -214,9 +214,9 @@ static ssize_t critmon_read_cpu(FAR struct critmon_file_s *attr,
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
/* Convert the for maximum time pre-emption disabled */
if (g_premp_max[cpu] > 0)
if (g_preemp_max[cpu] > 0)
{
perf_convert(g_premp_max[cpu], &maxtime);
perf_convert(g_preemp_max[cpu], &maxtime);
}
else
{
@ -226,7 +226,7 @@ static ssize_t critmon_read_cpu(FAR struct critmon_file_s *attr,
/* Reset the maximum */
g_premp_max[cpu] = 0;
g_preemp_max[cpu] = 0;
/* Generate output for maximum time pre-emption disabled */

View file

@ -774,9 +774,9 @@ static ssize_t proc_critmon(FAR struct proc_file_s *procfile,
/* Convert the for maximum time pre-emption disabled */
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
if (tcb->premp_max > 0)
if (tcb->preemp_max > 0)
{
perf_convert(tcb->premp_max, &maxtime);
perf_convert(tcb->preemp_max, &maxtime);
}
else
{
@ -786,14 +786,14 @@ static ssize_t proc_critmon(FAR struct proc_file_s *procfile,
/* Reset the maximum */
tcb->premp_max = 0;
tcb->preemp_max = 0;
/* Generate output for maximum time pre-emption disabled */
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, "%lu.%09lu %p,",
(unsigned long)maxtime.tv_sec,
(unsigned long)maxtime.tv_nsec,
tcb->premp_max_caller);
tcb->preemp_max_caller);
copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining,
&offset);

View file

@ -702,10 +702,10 @@ struct tcb_s
#endif
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
clock_t premp_start; /* Time when preemption disabled */
clock_t premp_max; /* Max time preemption disabled */
void *premp_caller; /* Caller of preemption disabled */
void *premp_max_caller; /* Caller of max preemption */
clock_t preemp_start; /* Time when preemption disabled */
clock_t preemp_max; /* Max time preemption disabled */
void *preemp_caller; /* Caller of preemption disabled */
void *preemp_max_caller; /* Caller of max preemption */
#endif
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0
@ -867,7 +867,7 @@ extern "C"
/* Maximum time with pre-emption disabled or within critical section. */
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
EXTERN clock_t g_premp_max[CONFIG_SMP_NCPUS];
EXTERN clock_t g_preemp_max[CONFIG_SMP_NCPUS];
#endif /* CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0 */
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0

View file

@ -93,7 +93,7 @@
/* Maximum time with pre-emption disabled or within critical section. */
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
clock_t g_premp_max[CONFIG_SMP_NCPUS];
clock_t g_preemp_max[CONFIG_SMP_NCPUS];
#endif
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0
@ -182,28 +182,28 @@ void nxsched_critmon_preemption(FAR struct tcb_s *tcb, bool state,
{
/* Disabling.. Save the thread start time */
tcb->premp_start = current;
tcb->premp_caller = caller;
tcb->preemp_start = current;
tcb->preemp_caller = caller;
}
else
{
/* Re-enabling.. Check for the max elapsed time */
clock_t elapsed = current - tcb->premp_start;
clock_t elapsed = current - tcb->preemp_start;
int cpu = this_cpu();
if (elapsed > tcb->premp_max)
if (elapsed > tcb->preemp_max)
{
tcb->premp_max = elapsed;
tcb->premp_max_caller = tcb->premp_caller;
tcb->preemp_max = elapsed;
tcb->preemp_max_caller = tcb->preemp_caller;
CHECK_PREEMPTION(tcb->pid, elapsed);
}
/* Check for the global max elapsed time */
if (elapsed > g_premp_max[cpu])
if (elapsed > g_preemp_max[cpu])
{
g_premp_max[cpu] = elapsed;
g_preemp_max[cpu] = elapsed;
}
}
}
@ -291,7 +291,7 @@ void nxsched_resume_critmon(FAR struct tcb_s *tcb)
{
/* Yes.. Save the start time */
tcb->premp_start = current;
tcb->preemp_start = current;
}
#endif /* CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION */
@ -349,11 +349,11 @@ void nxsched_suspend_critmon(FAR struct tcb_s *tcb)
{
/* Possibly re-enabling.. Check for the max elapsed time */
elapsed = current - tcb->premp_start;
if (elapsed > tcb->premp_max)
elapsed = current - tcb->preemp_start;
if (elapsed > tcb->preemp_max)
{
tcb->premp_max = elapsed;
tcb->premp_max_caller = tcb->premp_caller;
tcb->preemp_max = elapsed;
tcb->preemp_max_caller = tcb->preemp_caller;
CHECK_PREEMPTION(tcb->pid, elapsed);
}
@ -361,9 +361,9 @@ void nxsched_suspend_critmon(FAR struct tcb_s *tcb)
* re-open in nxsched_resume_critmon.
*/
if (elapsed > g_premp_max[cpu])
if (elapsed > g_preemp_max[cpu])
{
g_premp_max[cpu] = elapsed;
g_preemp_max[cpu] = elapsed;
}
}
#endif /* CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION */