diff --git a/arch/arm/src/sama5/sam_oneshot.c b/arch/arm/src/sama5/sam_oneshot.c index 45e70d7aa43..0ff07054fe0 100644 --- a/arch/arm/src/sama5/sam_oneshot.c +++ b/arch/arm/src/sama5/sam_oneshot.c @@ -267,6 +267,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, { /* Yes.. then cancel it */ + tcvdbg("Already running... cancelling\n"); (void)sam_oneshot_cancel(oneshot, NULL); } diff --git a/arch/arm/src/sama5/sam_tc.c b/arch/arm/src/sama5/sam_tc.c index 8f3bda08328..2e0c85f0804 100644 --- a/arch/arm/src/sama5/sam_tc.c +++ b/arch/arm/src/sama5/sam_tc.c @@ -855,8 +855,8 @@ static int sam_tc_freqdiv_lookup(uint32_t ftcin, int ndx) * Name: sam_tc_divfreq_lookup * * Description: - * Given the TC input frequency (Ftcin) and a divider index, return the value of - * the divided frequency + * Given the TC input frequency (Ftcin) and a divider index, return the + * value of the divided frequency * * Input Parameters: * ftcin - TC input frequency diff --git a/sched/sched/sched_addreadytorun.c b/sched/sched/sched_addreadytorun.c index 5cd53594096..f905d274301 100644 --- a/sched/sched/sched_addreadytorun.c +++ b/sched/sched/sched_addreadytorun.c @@ -137,11 +137,13 @@ bool sched_addreadytorun(FAR struct tcb_s *btcb) btcb->flink->task_state = TSTATE_TASK_READYTORUN; #if CONFIG_RR_INTERVAL > 0 - /* Whenever the task at the head of the ready-to-run chances, we +#if 0 /* REVISIT: This can cause crashes in certain cases */ + /* Whenever the task at the head of the ready-to-run changes, we * must reassess the interval time that controls time-slicing. */ sched_timer_reassess(); +#endif #endif ret = true; } diff --git a/sched/sched/sched_removereadytorun.c b/sched/sched/sched_removereadytorun.c index d89ecb9e33c..84a4726b7da 100644 --- a/sched/sched/sched_removereadytorun.c +++ b/sched/sched/sched_removereadytorun.c @@ -109,6 +109,16 @@ bool sched_removereadytorun(FAR struct tcb_s *rtcb) sched_note_switch(rtcb, rtcb->flink); rtcb->flink->task_state = TSTATE_TASK_RUNNING; + +#if CONFIG_RR_INTERVAL > 0 +#if 0 /* REVISIT: This can cause crashes in certain cases */ + /* Whenever the task at the head of the ready-to-run changes, we + * must reassess the interval time that controls time-slicing. + */ + + sched_timer_reassess(); +#endif +#endif ret = true; }