9
0
Fork 0

Fix priority inheritance bug

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1584 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2009-03-10 00:24:37 +00:00
parent 6eafb13ae9
commit 8baa34b312
1 changed files with 6 additions and 1 deletions

View File

@ -175,9 +175,14 @@ int sem_wait(FAR sem_t *sem)
* cannot cause a context switch because we have preemption
* disabled. The task will be marked "pending" and the switch
* will occur during up_block_task() processing.
*
* NOTE that we have to restore base_priority because
* up_reprioritize_rtr() should set both.
*/
int base_priority = htcb->base_priority;
up_reprioritize_rtr(htcb, rtcb->sched_priority);
htcb->base_priority = base_priority;
}
#endif
/* Add the TCB to the prioritized semaphore wait queue */