diff --git a/sched/sched/sched_addreadytorun.c b/sched/sched/sched_addreadytorun.c index a23b8990d0..eb9d551503 100644 --- a/sched/sched/sched_addreadytorun.c +++ b/sched/sched/sched_addreadytorun.c @@ -319,7 +319,10 @@ bool sched_addreadytorun(FAR struct tcb_s *btcb) /* Adjust global IRQ controls. This works differently if we are * performing a context switch from an interrupt handler and the * interrupt handler has established a critical section. We can - * detect this case when g_cpu_nestcount[me] > 0: + * detect this case when g_cpu_nestcount[me] > 0. + * + * REVISIT: Could this not cause logic to exit the critical + * section prematurely in the context switch sequence? */ if (g_cpu_nestcount[me] <= 0) diff --git a/sched/sched/sched_removereadytorun.c b/sched/sched/sched_removereadytorun.c index d22eb0e6bf..b056eefb57 100644 --- a/sched/sched/sched_removereadytorun.c +++ b/sched/sched/sched_removereadytorun.c @@ -263,7 +263,10 @@ bool sched_removereadytorun(FAR struct tcb_s *rtcb) /* Adjust global IRQ controls. This works differently if we are * performing a context switch from an interrupt handler and the * interrupt handler has established a critical section. We can - * detect this case when g_cpu_nestcount[me] > 0: + * detect this case when g_cpu_nestcount[me] > 0. + * + * REVISIT: Could this not cause logic to exit the critical section + * prematurely in the context switch sequence? */ if (g_cpu_nestcount[me] <= 0)