summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/api.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2019-11-15 18:05:52 -0800
committer Siarhei Vishniakou <svv@google.com> 2019-11-20 19:31:02 +0000
commit08b574f90cc9a21d5f9d47ec7b1b29a8692553e6 (patch)
treef9d6515e9cce4449cd8f184944d619cedb703dab /vulkan/libvulkan/api.cpp
parent39988e32373994cb693f7568f20ce34f5fa954c6 (diff)
Add busy wait for consume() call
We have no guarantee that consume() will find an available event right away. If we send an event to InputDispatcher, it may take some time for dispatcher to process the event. Only when the event is processed can we expect that it will be written to the socket. In the test, we currently allow no time for this to complete. For the upcoming tests, the work performed by dispatcher might be too large, so the tests would start to fail. If there is no event available at the socket, WOULD_BLOCK would be returned. So if we are sure an event is coming, we can busily wait, as long as the consume call is returning WOULD_BLOCK. Bug: none Test: atest inputflinger_tests The change was tested with a child CL for notifyDeviceReset. Change-Id: Ib9557c4de03c1b1d4a4eb1573d527f47facbf249
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions