summaryrefslogtreecommitdiffstats
path: root/opengl/shared/OpenglCodecCommon/Win32PipeStream.cpp
diff options
context:
space:
mode:
authorbohu <bohu@google.com>2015-09-16 15:52:03 -0700
committerbohu <bohu@google.com>2015-09-16 15:52:03 -0700
commit948dfb6e500f11106f68671d77f85bb633e678ce (patch)
treeb080dcdde4bdba3111e81a6b9326b9ff7952933c /opengl/shared/OpenglCodecCommon/Win32PipeStream.cpp
parent3ea472d45910dc4758dde13fde86e0ef87804f0f (diff)
downloadandroid_device_generic_goldfish-948dfb6e500f11106f68671d77f85bb633e678ce.tar.gz
android_device_generic_goldfish-948dfb6e500f11106f68671d77f85bb633e678ce.tar.bz2
android_device_generic_goldfish-948dfb6e500f11106f68671d77f85bb633e678ce.zip
emulator-fingerprint: Exit listener thread on HAL close
Note: This CL comes from Yu Ning <yu.ning@intel.com> The current fingerprint HAL module for the emulator cannot be closed, because fingerprint_close() always gets stuck waiting for the listener thread to finish execution. Meanwhile, the listener thread is blocked on qemud_channel_recv(), which does not return unless the host (QEMU) sends something through the qemud channel. This leads to the following bug: https://code.google.com/p/android/issues/detail?id=186174 It is worth noting, though, that fingerprint_close() does try to unblock qemud_channel_recv() by asynchronously closing the qemud channel, which is backed by goldfish pipe. Unfortunately, that does not work, probably because goldfish pipe does not automatically make pending I/O operations return after closing a channel. Any proper solution should probably poll the qemud channel before the call to qemud_channel_recv(), and make sure the polling can be canceled, allowing the listener thread to terminate gracefully. Setting a timeout for poll() is straightforward to implement. Another (slightly better) mechanism that enables instant interruption of the polling of the qemud channel has also been implemented and tested, but is more complicated and would add 200+ lines to fingerprint.c. Therefore, take the simple, timeout-based approach for now, and maybe revisit this issue in the future. Change-Id: I02aa1f631d4ee651fe1ac7fb338076beaedddc40
Diffstat (limited to 'opengl/shared/OpenglCodecCommon/Win32PipeStream.cpp')
0 files changed, 0 insertions, 0 deletions