summaryrefslogtreecommitdiffstats
path: root/tests/framework-tests/src
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-04-27 16:11:38 -0700
committerMathias Agopian <mathias@google.com>2010-04-28 16:12:54 -0700
commitc54c12713b98f308f848d2eb9ed7ef28ecc62c55 (patch)
treecee4c74a6421cd6b128ed3c2538c836469c6ba06 /tests/framework-tests/src
parent3fd6419fe542c4ecb8e838d1754a83ce8591b288 (diff)
downloadframeworks_base-c54c12713b98f308f848d2eb9ed7ef28ecc62c55.zip
frameworks_base-c54c12713b98f308f848d2eb9ed7ef28ecc62c55.tar.gz
frameworks_base-c54c12713b98f308f848d2eb9ed7ef28ecc62c55.tar.bz2
fix a race condition in undoDequeue(), where 'tail' could be computed incorrectly.
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
Diffstat (limited to 'tests/framework-tests/src')
0 files changed, 0 insertions, 0 deletions