Fixed bug 3055329.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_2.0.x@2140 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2010-08-29 09:39:57 +00:00
parent c73d224aff
commit dc8ce35935
4 changed files with 12 additions and 7 deletions

View File

@ -43,13 +43,15 @@ static INLINE void prio_insert(Thread *tp, ThreadsQueue *tqp) {
do {
cp = cp->p_next;
} while ((cp != (Thread *)tqp) && (cp->p_prio >= tp->p_prio));
tp->p_prev = (tp->p_next = cp)->p_prev;
tp->p_next = cp;
tp->p_prev = cp->p_prev;
tp->p_prev->p_next = cp->p_prev = tp;
}
static INLINE void queue_insert(Thread *tp, ThreadsQueue *tqp) {
tp->p_prev = (tp->p_next = (Thread *)tqp)->p_prev;
tp->p_next = (Thread *)tqp;
tp->p_prev = tqp->p_prev;
tp->p_prev->p_next = tqp->p_prev = tp;
}

View File

@ -55,9 +55,9 @@ void prio_insert(Thread *tp, ThreadsQueue *tqp) {
cp = cp->p_next;
/* Not end of queue? and cp has equal or higher priority than tp?.*/
} while ((cp != (Thread *)tqp) && (cp->p_prio >= tp->p_prio));
/* Insert before cp, point tp to next and prev in queue.*/
tp->p_prev = (tp->p_next = cp)->p_prev;
/* Make prev point to tp, and cp point back to tp.*/
/* Insertion on p_prev.*/
tp->p_next = cp;
tp->p_prev = cp->p_prev;
tp->p_prev->p_next = cp->p_prev = tp;
}
@ -70,7 +70,8 @@ void prio_insert(Thread *tp, ThreadsQueue *tqp) {
*/
void queue_insert(Thread *tp, ThreadsQueue *tqp) {
tp->p_prev = (tp->p_next = (Thread *)tqp)->p_prev;
tp->p_next = (Thread *)tqp;
tp->p_prev = tqp->p_prev;
tp->p_prev->p_next = tqp->p_prev = tp;
}

View File

@ -85,7 +85,8 @@ Thread *chSchReadyI(Thread *tp) {
cp = cp->p_next;
} while (cp->p_prio >= tp->p_prio);
/* Insertion on p_prev.*/
tp->p_prev = (tp->p_next = cp)->p_prev;
tp->p_next = cp;
tp->p_prev = cp->p_prev;
tp->p_prev->p_next = cp->p_prev = tp;
return tp;
}

View File

@ -59,6 +59,7 @@
*****************************************************************************
*** 2.0.3 ***
- FIX: Fixed crash of the Posix simulator under Ubuntu 10.4 (bug 3055329).
- FIX: Fixed incorrect PLL2 setting in STM32 HAL (bug 3044770).
- FIX: Fixed wrong check on STM32_HCLK (bug 3044758).
- FIX: Fixed wrong condition check in STM32 PWM driver (bug 3041414).