diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-11 07:05:47 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-11 07:05:47 -0600 |
commit | c9ff241626b21a98cef543a03444fd1cf1e5e11b (patch) | |
tree | 09f8957745fbd1a5d57be1e6c509ac2f6c4432f3 | |
parent | b48c5e99cfe5883968ba738a936a4f787c523ca9 (diff) | |
download | nuttx-c9ff241626b21a98cef543a03444fd1cf1e5e11b.tar.gz nuttx-c9ff241626b21a98cef543a03444fd1cf1e5e11b.tar.bz2 nuttx-c9ff241626b21a98cef543a03444fd1cf1e5e11b.zip |
Comment out reassessment of timer in the middle of context switches. Need to revisit
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_oneshot.c | 1 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_tc.c | 4 | ||||
-rw-r--r-- | nuttx/sched/sched/sched_addreadytorun.c | 4 | ||||
-rw-r--r-- | nuttx/sched/sched/sched_removereadytorun.c | 10 |
4 files changed, 16 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/sama5/sam_oneshot.c b/nuttx/arch/arm/src/sama5/sam_oneshot.c index 45e70d7aa..0ff07054f 100644 --- a/nuttx/arch/arm/src/sama5/sam_oneshot.c +++ b/nuttx/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/nuttx/arch/arm/src/sama5/sam_tc.c b/nuttx/arch/arm/src/sama5/sam_tc.c index 8f3bda083..2e0c85f08 100644 --- a/nuttx/arch/arm/src/sama5/sam_tc.c +++ b/nuttx/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/nuttx/sched/sched/sched_addreadytorun.c b/nuttx/sched/sched/sched_addreadytorun.c index 5cd535940..f905d2743 100644 --- a/nuttx/sched/sched/sched_addreadytorun.c +++ b/nuttx/sched/sched/sched_addreadytorun.c @@ -137,12 +137,14 @@ 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; } else diff --git a/nuttx/sched/sched/sched_removereadytorun.c b/nuttx/sched/sched/sched_removereadytorun.c index d89ecb9e3..84a4726b7 100644 --- a/nuttx/sched/sched/sched_removereadytorun.c +++ b/nuttx/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; } |