diff options
-rw-r--r-- | os/kernel/include/chinline.h | 6 | ||||
-rw-r--r-- | os/kernel/src/chlists.c | 9 | ||||
-rw-r--r-- | os/kernel/src/chschd.c | 3 | ||||
-rw-r--r-- | readme.txt | 2 |
4 files changed, 13 insertions, 7 deletions
diff --git a/os/kernel/include/chinline.h b/os/kernel/include/chinline.h index a0beb7455..f41c12cc2 100644 --- a/os/kernel/include/chinline.h +++ b/os/kernel/include/chinline.h @@ -36,13 +36,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;
}
diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index 2d973e771..83bdf8b35 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -48,9 +48,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;
}
@@ -63,7 +63,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;
}
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c index d412798c0..51987749f 100644 --- a/os/kernel/src/chschd.c +++ b/os/kernel/src/chschd.c @@ -78,7 +78,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;
}
diff --git a/readme.txt b/readme.txt index b95f1b611..514666c89 100644 --- a/readme.txt +++ b/readme.txt @@ -62,6 +62,8 @@ *****************************************************************************
*** 2.1.2 ***
+- FIX: Fixed crash of the Posix simulator under Ubuntu 10.4 (bug 3055329)
+ (backported to 2.0.3).
- FIX: Fixed incorrect PLL2 setting in STM32 HAL (bug 3044770)(backported
in 2.0.3).
- FIX: Fixed wrong check on STM32_HCLK (bug 3044758)(backported to 2.0.3).
|