Skip to content
Snippets Groups Projects
Commit 45ce0132 authored by patacongo's avatar patacongo
Browse files

Fix workqueue assertion; STM32 power management

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5079 42af7a65-404d-4744-a932-0658087f49c3
parent e84c4710
No related branches found
No related tags found
No related merge requests found
......@@ -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).
......@@ -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
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment