From eec9281e9f68e668aa2dc5e47f2ab2bbb42c06fe Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 22 Aug 2015 09:10:11 +0000 Subject: Changed some thread_reference_t in thread_t * git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8233 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/osal/nil/osal.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'os/hal/osal/nil') diff --git a/os/hal/osal/nil/osal.c b/os/hal/osal/nil/osal.c index f935e6e8c..f1d8c5e2a 100644 --- a/os/hal/osal/nil/osal.c +++ b/os/hal/osal/nil/osal.c @@ -60,20 +60,20 @@ void osalThreadDequeueNextI(threads_queue_t *tqp, msg_t msg) { semaphore_t *sp = &tqp->sem; if (chSemGetCounterI(&tqp->sem) < (cnt_t)0) { - thread_reference_t tr = nil.threads; + thread_t *tp = nil.threads; while (true) { /* Is this thread waiting on this semaphore?*/ - if (tr->u1.semp == sp) { + if (tp->u1.semp == sp) { sp->cnt++; - chDbgAssert(NIL_THD_IS_WTSEM(tr), "not waiting"); + chDbgAssert(NIL_THD_IS_WTSEM(tp), "not waiting"); - (void) chSchReadyI(tr, msg); + (void) chSchReadyI(tp, msg); return; } - tr++; + tp++; - chDbgAssert(tr < &nil.threads[NIL_CFG_NUM_THREADS], + chDbgAssert(tp < &nil.threads[NIL_CFG_NUM_THREADS], "pointer out of range"); } } @@ -89,26 +89,26 @@ void osalThreadDequeueNextI(threads_queue_t *tqp, msg_t msg) { */ void osalThreadDequeueAllI(threads_queue_t *tqp, msg_t msg) { semaphore_t *sp = &tqp->sem; - thread_reference_t tr; + thread_t *tp; cnt_t cnt; cnt = sp->cnt; sp->cnt = (cnt_t)0; - tr = nil.threads; + tp = nil.threads; while (cnt < (cnt_t)0) { - chDbgAssert(tr < &nil.threads[NIL_CFG_NUM_THREADS], + chDbgAssert(tp < &nil.threads[NIL_CFG_NUM_THREADS], "pointer out of range"); /* Is this thread waiting on this semaphore?*/ - if (tr->u1.semp == sp) { + if (tp->u1.semp == sp) { - chDbgAssert(NIL_THD_IS_WTSEM(tr), "not waiting"); + chDbgAssert(NIL_THD_IS_WTSEM(tp), "not waiting"); cnt++; - (void) chSchReadyI(tr, msg); + (void) chSchReadyI(tp, msg); } - tr++; + tp++; } } -- cgit v1.2.3