aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/threads.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/threads.h')
-rw-r--r--src/include/threads.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/include/threads.h b/src/include/threads.h
index beb41aae7..12737de2e 100644
--- a/src/include/threads.h
+++ b/src/include/threads.h
@@ -78,7 +78,7 @@ struct Thread {
* systems, be caruful in doing so.
*/
#ifdef CH_USE_WAITEXIT
- /** The queue of the threads waiting for this thread termination.*/
+ /** The list of the threads waiting for this thread termination.*/
ThreadsList p_waiting;
#endif
#ifdef CH_USE_EXIT_EVENT
@@ -151,10 +151,8 @@ typedef t_msg (*t_tfunc)(void *);
#ifdef CH_OPTIMIZE_SPEED
static INLINE void fifo_insert(Thread *tp, ThreadsQueue *tqp) {
- tp->p_next = (Thread *)tqp;
- tp->p_prev = tqp->p_prev;
- tqp->p_prev->p_next = tp;
- tqp->p_prev = tp;
+ tp->p_prev = (tp->p_next = (Thread *)tqp)->p_prev;
+ tp->p_prev->p_next = tqp->p_prev = tp;
}
static INLINE Thread *fifo_remove(ThreadsQueue *tqp) {