mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
sched/sched_critmonitor: remove duplicate preemption start block
The `to->preemp_start = current` assignment when `to->lockcount > 0` was executed twice under CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION, once in the main preemption block and again after the csection block. Remove the redundant duplicate. Signed-off-by: yushuailong <yyyusl@qq.com>
This commit is contained in:
parent
634d8a1272
commit
3b3380ca01
1 changed files with 0 additions and 12 deletions
|
|
@ -454,18 +454,6 @@ void nxsched_switch_critmon(FAR struct tcb_s *from, FAR struct tcb_s *to)
|
|||
}
|
||||
|
||||
#endif /* CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION */
|
||||
|
||||
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
|
||||
|
||||
/* Did this task disable pre-emption? */
|
||||
|
||||
if (to->lockcount > 0)
|
||||
{
|
||||
/* Yes.. Save the start time */
|
||||
|
||||
to->premp_start = current;
|
||||
}
|
||||
#endif /* CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION */
|
||||
}
|
||||
|
||||
void nxsched_update_critmon(FAR struct tcb_s *tcb)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue