git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1533 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2010-01-20 19:37:07 +00:00
parent 7bd8164f8f
commit 14005a2ffe
2 changed files with 5 additions and 5 deletions

View File

@ -88,26 +88,26 @@ void chMtxLockS(Mutex *mp) {
switch (tp->p_state) { switch (tp->p_state) {
case THD_STATE_WTMTX: case THD_STATE_WTMTX:
/* Re-enqueues tp with its new priority on the mutex wait queue.*/ /* Re-enqueues tp with its new priority on the mutex wait queue.*/
prio_insert(dequeue(tp), (ThreadsQueue *)&tp->p_u.wtobjp); prio_insert(dequeue(tp), (ThreadsQueue *)tp->p_u.wtobjp);
/* Boost the owner of this mutex if needed.*/ /* Boost the owner of this mutex if needed.*/
tp = ((Mutex *)tp->p_u.wtobjp)->m_owner; tp = ((Mutex *)tp->p_u.wtobjp)->m_owner;
continue; continue;
#if CH_USE_CONDVARS #if CH_USE_CONDVARS
case THD_STATE_WTCOND: case THD_STATE_WTCOND:
/* Re-enqueues tp with its new priority on the condvar queue.*/ /* Re-enqueues tp with its new priority on the condvar queue.*/
prio_insert(dequeue(tp), (ThreadsQueue *)&tp->p_u.wtobjp); prio_insert(dequeue(tp), (ThreadsQueue *)tp->p_u.wtobjp);
break; break;
#endif #endif
#if CH_USE_SEMAPHORES_PRIORITY #if CH_USE_SEMAPHORES_PRIORITY
case THD_STATE_WTSEM: case THD_STATE_WTSEM:
/* Re-enqueues tp with its new priority on the semaphore queue.*/ /* Re-enqueues tp with its new priority on the semaphore queue.*/
prio_insert(dequeue(tp), (ThreadsQueue *)&tp->p_u.wtobjp); prio_insert(dequeue(tp), (ThreadsQueue *)tp->p_u.wtobjp);
break; break;
#endif #endif
#if CH_USE_MESSAGES_PRIORITY #if CH_USE_MESSAGES_PRIORITY
case THD_STATE_SNDMSG: case THD_STATE_SNDMSG:
/* Re-enqueues tp with its new priority on the server thread queue.*/ /* Re-enqueues tp with its new priority on the server thread queue.*/
prio_insert(dequeue(tp), ((Thread *)tp->p_u.wtobjp)->p_msgqueue); prio_insert(dequeue(tp), &((Thread *)tp->p_u.wtobjp)->p_msgqueue);
break; break;
#endif #endif
case THD_STATE_READY: case THD_STATE_READY:

View File

@ -158,7 +158,7 @@ void PendSVVector(void) {
PUSH_CONTEXT(sp_thd); PUSH_CONTEXT(sp_thd);
(otp = currp)->p_ctx.r13 = sp_thd; (otp = currp)->p_ctx.r13 = sp_thd;
(currp = fifo_remove(&rlist.r_queue))->p_state = PRCURR; (currp = fifo_remove(&rlist.r_queue))->p_state = THD_STATE_CURRENT;
chSchReadyI(otp); chSchReadyI(otp);
#if CH_TIME_QUANTUM > 0 #if CH_TIME_QUANTUM > 0
/* set the round-robin time quantum */ /* set the round-robin time quantum */