summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/api.cpp
diff options
context:
space:
mode:
author Wonsik Kim <wonsik@google.com> 2021-05-04 19:31:29 -0700
committer Wonsik Kim <wonsik@google.com> 2021-05-04 19:50:17 -0700
commit567533eca188e287f82d99956c5d6a134b9cf8c7 (patch)
treecd104a5db73d8b0fb5e84e8b165f8a98c255a3b9 /vulkan/libvulkan/api.cpp
parent316bdbd6524e5c03c2aeb86499bda6c13b5124ae (diff)
BLASTBufferQueue: fix AsyncWorker race condition
Address the following scenario: [T1] AsyncProducerListener::onBufferReleased() is called for the first time. [T2] AsyncWorker::mThread is just created and not acquired the mutex yet. [T1] AsyncProducerListener::post() is called and acquired the mutex. [T1] The runnable is queued to mRunnable and mCv is notified. There are no threads waiting for mCv, so this is ignored. [T2] AsyncWorker::mThread acquires the mutex, and wait on mCv. If the client is waiting for the first onBufferReleased callback, it will be stuck indefinitely. Bug: 186630119 Test: atest --iterations 100 android.media.cts.MediaSyncTest Change-Id: I65d98d64233fa8d488788319a4850be4cace48cc
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions