summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nuttx/ChangeLog3
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_idle.c5
-rw-r--r--nuttx/sched/work_cancel.c12
3 files changed, 14 insertions, 6 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 3ba81d4a7e..b67c066bcb 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3247,3 +3247,6 @@
logic from mksyscall.c into files where it can be shared.
* tools/mksymtab.c: Add a tool that can be used to convert a CSV file
into a NuttX-style symbol table.
+ * sched/work_cancel.c: Fix a bad assertion (reported by Mike Smith)
+ * configs/stm3210e-eval/src/up_idle.c: Correct some power management
+ compilation errors (reported by Diego Sanchez).
diff --git a/nuttx/configs/stm3210e-eval/src/up_idle.c b/nuttx/configs/stm3210e-eval/src/up_idle.c
index 910d0a9d6c..7b682e2bb1 100644
--- a/nuttx/configs/stm3210e-eval/src/up_idle.c
+++ b/nuttx/configs/stm3210e-eval/src/up_idle.c
@@ -277,11 +277,10 @@ static void up_idlepm(void)
{
/* Resume normal operation */
- newstate = PM_NORMAL:
+ newstate = PM_NORMAL;
}
}
else
-#endif
{
/* Let the PM system decide, which power saving level can be obtained */
@@ -413,7 +412,7 @@ errout:
}
#else
# define up_idlepm()
-#endif
+#endif /* CONFIG_PM */
/****************************************************************************
* Public Functions
diff --git a/nuttx/sched/work_cancel.c b/nuttx/sched/work_cancel.c
index c277f024d2..30b650826b 100644
--- a/nuttx/sched/work_cancel.c
+++ b/nuttx/sched/work_cancel.c
@@ -104,10 +104,16 @@ int work_cancel(struct work_s *work)
flags = irqsave();
if (work->worker != NULL)
{
- DEBUGASSERT(work->dq.flink || (FAR dq_entry_t *)work == g_work.head);
- DEBUGASSERT(work->dq.blink || (FAR dq_entry_t *)work == g_work.tail);
- dq_rem((FAR dq_entry_t *)work, &g_work);
+ /* A little test of the integrity of the work queue */
+
+ DEBUGASSERT(work->dq.flink ||(FAR dq_entry_t *)work == g_work.tail);
+ DEBUGASSERT(work->dq.blink ||(FAR dq_entry_t *)work == g_work.head);
+ /* Remove the entry from the work queue and make sure that it is
+ * mark as availalbe (i.e., the worker field is nullified).
+ */
+
+ dq_rem((FAR dq_entry_t *)work, &g_work);
work->worker = NULL;
}