summaryrefslogtreecommitdiff
path: root/opengl/tests/gl_basic/gl_basic.cpp
diff options
context:
space:
mode:
authorDave Sparks <davidsparks@android.com>2009-11-10 17:08:08 -0800
committerDave Sparks <davidsparks@android.com>2009-11-10 17:08:08 -0800
commitff0f38e6fe2402b1320bc5faeea3f7bec27a3a94 (patch)
treea9acd18ab5526d297928f96c094ca22eaa33e593 /opengl/tests/gl_basic/gl_basic.cpp
parent3bde289d23935c1138a73874999278d822b36b3c (diff)
Fix potential deadlock in stopPreview/stopRecord.
Some camera HALs spin up a preview thread and need to wait for the thread to exit. This can create a potential deadlock. In stopPreview, we take the main lock. If a preview callback occurs while the lock is held, the preview thread will block. If the camera HAL is waiting for the preview thread to exit, this will cause a deadlock. This patch breaks out the preview buffer heap into a separate mutex. This mutex is never held when the main lock is held, thus preventing the deadlock from occuring.
Diffstat (limited to 'opengl/tests/gl_basic/gl_basic.cpp')
0 files changed, 0 insertions, 0 deletions