in the undoDequeue() case, 'tail' was recalculated from 'available' and 'head'
however there was a race between this and retireAndLock(), which could cause
'tail' to be recalculated wrongly.
the interesting thing though is that retireAndLock() shouldn't have any impact
on the value of 'tail', which is client-side only attribute.
we fix the race by saving the value of 'tail' before dequeue() and restore it
in the case of undoDequeue(), since we know it doesn't depend on retireAndLock().
Change-Id: I4bcc4d16b6bc4dd93717ee739c603040b18295a0
also increase the dirtyregion size from 1 to 6 rectangles.
Overall we now need 27KiB process instead of 4KiB
Change-Id: Iebda5565015158f49d9ca8dbcf55e6ad04855be3
Condition must be initialized with SHARED for the old behavior, where
they can be used accross processes.
Updated the two places android that require SHARED conditions.
PRIVATE conditions (and mutexes) use more efficient syscalls.
Change-Id: I9a281a4b88206e92ac559c66554e886b9c62db3a