mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
sched/sched: Modify the critical section interface name.
replace _wo_note to _notrace. Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
This commit is contained in:
@@ -1405,7 +1405,7 @@ void sched_note_wdog(uint8_t event, FAR void *handler, FAR const void *arg)
|
||||
FAR struct tcb_s *tcb = this_task();
|
||||
irqstate_t flags;
|
||||
|
||||
flags = enter_critical_section_wo_note();
|
||||
flags = enter_critical_section_notrace();
|
||||
for (driver = g_note_drivers; *driver; driver++)
|
||||
{
|
||||
if (note_wdog(*driver, event, handler, arg))
|
||||
@@ -1431,7 +1431,7 @@ void sched_note_wdog(uint8_t event, FAR void *handler, FAR const void *arg)
|
||||
note_add(*driver, ¬e, sizeof(note));
|
||||
}
|
||||
|
||||
leave_critical_section_wo_note(flags);
|
||||
leave_critical_section_notrace(flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+6
-6
@@ -328,13 +328,13 @@ int irqchain_detach(int irq, xcpt_t isr, FAR void *arg);
|
||||
defined(CONFIG_SCHED_INSTRUMENTATION_CSECTION)
|
||||
irqstate_t enter_critical_section(void) noinstrument_function;
|
||||
# else
|
||||
# define enter_critical_section() enter_critical_section_wo_note()
|
||||
# define enter_critical_section() enter_critical_section_notrace()
|
||||
# endif
|
||||
|
||||
irqstate_t enter_critical_section_wo_note(void) noinstrument_function;
|
||||
irqstate_t enter_critical_section_notrace(void) noinstrument_function;
|
||||
#else
|
||||
# define enter_critical_section() up_irq_save()
|
||||
# define enter_critical_section_wo_note() up_irq_save()
|
||||
# define enter_critical_section_notrace() up_irq_save()
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -366,13 +366,13 @@ irqstate_t enter_critical_section_wo_note(void) noinstrument_function;
|
||||
defined(CONFIG_SCHED_INSTRUMENTATION_CSECTION)
|
||||
void leave_critical_section(irqstate_t flags) noinstrument_function;
|
||||
# else
|
||||
# define leave_critical_section(f) leave_critical_section_wo_note(f)
|
||||
# define leave_critical_section(f) leave_critical_section_notrace(f)
|
||||
# endif
|
||||
|
||||
void leave_critical_section_wo_note(irqstate_t flags) noinstrument_function;
|
||||
void leave_critical_section_notrace(irqstate_t flags) noinstrument_function;
|
||||
#else
|
||||
# define leave_critical_section(f) up_irq_restore(f)
|
||||
# define leave_critical_section_wo_note(f) up_irq_restore(f)
|
||||
# define leave_critical_section_notrace(f) up_irq_restore(f)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -79,7 +79,7 @@ volatile uint8_t g_cpu_nestcount[CONFIG_SMP_NCPUS];
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: enter_critical_section_wo_note
|
||||
* Name: enter_critical_section_notrace
|
||||
*
|
||||
* Description:
|
||||
* Take the CPU IRQ lock and disable interrupts on all CPUs. A thread-
|
||||
@@ -89,7 +89,7 @@ volatile uint8_t g_cpu_nestcount[CONFIG_SMP_NCPUS];
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
irqstate_t enter_critical_section_wo_note(void)
|
||||
irqstate_t enter_critical_section_notrace(void)
|
||||
{
|
||||
FAR struct tcb_s *rtcb;
|
||||
irqstate_t ret;
|
||||
@@ -255,7 +255,7 @@ irqstate_t enter_critical_section_wo_note(void)
|
||||
|
||||
#else
|
||||
|
||||
irqstate_t enter_critical_section_wo_note(void)
|
||||
irqstate_t enter_critical_section_notrace(void)
|
||||
{
|
||||
irqstate_t ret;
|
||||
|
||||
@@ -290,7 +290,7 @@ irqstate_t enter_critical_section(void)
|
||||
{
|
||||
FAR struct tcb_s *rtcb;
|
||||
irqstate_t flags;
|
||||
flags = enter_critical_section_wo_note();
|
||||
flags = enter_critical_section_notrace();
|
||||
|
||||
if (!up_interrupt_context())
|
||||
{
|
||||
@@ -311,7 +311,7 @@ irqstate_t enter_critical_section(void)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: leave_critical_section_wo_note
|
||||
* Name: leave_critical_section_notrace
|
||||
*
|
||||
* Description:
|
||||
* Decrement the IRQ lock count and if it decrements to zero then release
|
||||
@@ -320,7 +320,7 @@ irqstate_t enter_critical_section(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
void leave_critical_section_wo_note(irqstate_t flags)
|
||||
void leave_critical_section_notrace(irqstate_t flags)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
@@ -420,7 +420,7 @@ void leave_critical_section_wo_note(irqstate_t flags)
|
||||
up_irq_restore(flags);
|
||||
}
|
||||
#else
|
||||
void leave_critical_section_wo_note(irqstate_t flags)
|
||||
void leave_critical_section_notrace(irqstate_t flags)
|
||||
{
|
||||
/* Check if we were called from an interrupt handler and that the tasks
|
||||
* lists have been initialized.
|
||||
@@ -465,6 +465,6 @@ void leave_critical_section(irqstate_t flags)
|
||||
}
|
||||
}
|
||||
|
||||
leave_critical_section_wo_note(flags);
|
||||
leave_critical_section_notrace(flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -86,13 +86,13 @@ void sched_lock(void)
|
||||
{
|
||||
#if (CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0) || \
|
||||
defined(CONFIG_SCHED_INSTRUMENTATION_PREEMPTION)
|
||||
irqstate_t flags = enter_critical_section_wo_note();
|
||||
irqstate_t flags = enter_critical_section_notrace();
|
||||
|
||||
/* Note that we have pre-emption locked */
|
||||
|
||||
nxsched_critmon_preemption(rtcb, true, return_address(0));
|
||||
sched_note_preemption(rtcb, true);
|
||||
leave_critical_section_wo_note(flags);
|
||||
leave_critical_section_notrace(flags);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ void sched_unlock(void)
|
||||
|
||||
if (rtcb->lockcount == 1)
|
||||
{
|
||||
irqstate_t flags = enter_critical_section_wo_note();
|
||||
irqstate_t flags = enter_critical_section_notrace();
|
||||
FAR struct tcb_s *ptcb;
|
||||
|
||||
rtcb->lockcount = 0;
|
||||
@@ -170,7 +170,7 @@ void sched_unlock(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
leave_critical_section_wo_note(flags);
|
||||
leave_critical_section_notrace(flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user