aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-02-07 12:56:06 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-02-07 12:56:06 +0000
commita13c32870977d0b368520d5cd667b1a904a899e7 (patch)
tree871ccd7568ea90fdc7a52ee86043506fb9f3ed72
parent24f0bf2a223a6fbf26c823a9423b291b179fa8e6 (diff)
downloadChibiOS-a13c32870977d0b368520d5cd667b1a904a899e7.tar.gz
ChibiOS-a13c32870977d0b368520d5cd667b1a904a899e7.tar.bz2
ChibiOS-a13c32870977d0b368520d5cd667b1a904a899e7.zip
Fixed problem with priority enqueued semaphores during mutexes-related priority boost.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@738 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--src/chmtx.c12
-rw-r--r--todo.txt2
2 files changed, 10 insertions, 4 deletions
diff --git a/src/chmtx.c b/src/chmtx.c
index e441a5729..ffcab9d2f 100644
--- a/src/chmtx.c
+++ b/src/chmtx.c
@@ -83,20 +83,26 @@ void chMtxLockS(Mutex *mp) {
switch (tp->p_state) {
/* thread tp is waiting on a mutex? */
case PRWTMTX:
- /* requeue tp with its new priority on the mutex wait queue */
+ /* Requeues tp with its new priority on the mutex wait queue. */
prio_insert(dequeue(tp), &tp->p_wtmtxp->m_queue);
/* boost the owner of this mutex if needed */
tp = tp->p_wtmtxp->m_owner;
continue;
+#if CH_USE_SEMAPHORES_PRIORITY
+ case PRWTSEM:
+ /* Requeues tp with its new priority on the semaphore queue. */
+ prio_insert(dequeue(tp), &tp->p_wtsemp->s_queue);
+ break;
+#endif
#if CH_USE_MESSAGES_PRIORITY
case PRSNDMSG:
- /* requeue tp with its new priority on (?) */
+ /* Requeues tp with its new priority on the server thread queue. */
prio_insert(dequeue(tp), &tp->p_wtthdp->p_msgqueue);
break;
#endif
/* thread tp is ready? */
case PRREADY:
- /* requeue tp with its new priority on the ready list */
+ /* Requeue tp with its new priority on the ready list. */
chSchReadyI(dequeue(tp));
}
break;
diff --git a/todo.txt b/todo.txt
index d7ae9f840..150cebfe4 100644
--- a/todo.txt
+++ b/todo.txt
@@ -5,7 +5,7 @@ After 1.0.0:
X OSEK-style chSysSuspendAll()/chSysResumeAll()/chSysEnable()/chSysDisable().
- OSEK-style simple tasks within the idle thread.
- Think to something for threads restart.
-- lwIP TCP/IP stack integration.
+X lwIP TCP/IP stack integration.
- Minimal optional C-runtime library (complete enough for lwIP).
- Multiple heaps, disjoint heaps, heaps in heaps.
- Multiple debug levels.