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:
parent
d7a1aab1a2
commit
06390e88a0
|
@ -3247,3 +3247,6 @@
|
||||||
logic from mksyscall.c into files where it can be shared.
|
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
|
* tools/mksymtab.c: Add a tool that can be used to convert a CSV file
|
||||||
into a NuttX-style symbol table.
|
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 */
|
/* Resume normal operation */
|
||||||
|
|
||||||
newstate = PM_NORMAL:
|
newstate = PM_NORMAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
/* Let the PM system decide, which power saving level can be obtained */
|
/* Let the PM system decide, which power saving level can be obtained */
|
||||||
|
|
||||||
|
@ -413,7 +412,7 @@ errout:
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define up_idlepm()
|
# define up_idlepm()
|
||||||
#endif
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
|
|
@ -104,10 +104,16 @@ int work_cancel(struct work_s *work)
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
if (work->worker != NULL)
|
if (work->worker != NULL)
|
||||||
{
|
{
|
||||||
DEBUGASSERT(work->dq.flink || (FAR dq_entry_t *)work == g_work.head);
|
/* A little test of the integrity of the work queue */
|
||||||
DEBUGASSERT(work->dq.blink || (FAR dq_entry_t *)work == g_work.tail);
|
|
||||||
dq_rem((FAR dq_entry_t *)work, &g_work);
|
|
||||||
|
|
||||||
|
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;
|
work->worker = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue