fixed a comparison bug in sift_down_sem_heap() for semaphore heap management
This commit is contained in:
parent
a7675116b6
commit
3a62300269
@ -796,7 +796,7 @@ static void sift_down_sem_heap (moo_t* moo, moo_ooi_t index)
|
|||||||
left = SEM_HEAP_LEFT(index);
|
left = SEM_HEAP_LEFT(index);
|
||||||
right = SEM_HEAP_RIGHT(index);
|
right = SEM_HEAP_RIGHT(index);
|
||||||
|
|
||||||
if (right < moo->sem_heap_count && SEM_HEAP_EARLIER_THAN(moo, moo->sem_heap[left], moo->sem_heap[right]))
|
if (right < moo->sem_heap_count && SEM_HEAP_EARLIER_THAN(moo, moo->sem_heap[right], moo->sem_heap[left]))
|
||||||
{
|
{
|
||||||
child = right;
|
child = right;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user