9
0
Fork 0

Fix workqueue assertion; STM32 power management

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5079 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2012-09-02 13:37:28 +00:00
parent d7a1aab1a2
commit 06390e88a0
3 changed files with 14 additions and 6 deletions

View File

@ -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).

View File

@ -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

View File

@ -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;
}