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
This commit is contained in:
parent
d8366c2bf5
commit
eec9281e9f
|
@ -60,20 +60,20 @@ void osalThreadDequeueNextI(threads_queue_t *tqp, msg_t msg) {
|
||||||
semaphore_t *sp = &tqp->sem;
|
semaphore_t *sp = &tqp->sem;
|
||||||
|
|
||||||
if (chSemGetCounterI(&tqp->sem) < (cnt_t)0) {
|
if (chSemGetCounterI(&tqp->sem) < (cnt_t)0) {
|
||||||
thread_reference_t tr = nil.threads;
|
thread_t *tp = nil.threads;
|
||||||
while (true) {
|
while (true) {
|
||||||
/* Is this thread waiting on this semaphore?*/
|
/* Is this thread waiting on this semaphore?*/
|
||||||
if (tr->u1.semp == sp) {
|
if (tp->u1.semp == sp) {
|
||||||
sp->cnt++;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
tr++;
|
tp++;
|
||||||
|
|
||||||
chDbgAssert(tr < &nil.threads[NIL_CFG_NUM_THREADS],
|
chDbgAssert(tp < &nil.threads[NIL_CFG_NUM_THREADS],
|
||||||
"pointer out of range");
|
"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) {
|
void osalThreadDequeueAllI(threads_queue_t *tqp, msg_t msg) {
|
||||||
semaphore_t *sp = &tqp->sem;
|
semaphore_t *sp = &tqp->sem;
|
||||||
thread_reference_t tr;
|
thread_t *tp;
|
||||||
cnt_t cnt;
|
cnt_t cnt;
|
||||||
|
|
||||||
cnt = sp->cnt;
|
cnt = sp->cnt;
|
||||||
sp->cnt = (cnt_t)0;
|
sp->cnt = (cnt_t)0;
|
||||||
tr = nil.threads;
|
tp = nil.threads;
|
||||||
while (cnt < (cnt_t)0) {
|
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");
|
"pointer out of range");
|
||||||
|
|
||||||
/* Is this thread waiting on this semaphore?*/
|
/* 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++;
|
cnt++;
|
||||||
(void) chSchReadyI(tr, msg);
|
(void) chSchReadyI(tp, msg);
|
||||||
}
|
}
|
||||||
tr++;
|
tp++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue