diff options
author | Elliott Hughes <enh@google.com> | 2015-07-23 15:20:09 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-07-24 12:35:50 -0700 |
commit | 812f030477bcd2ba064fef51d58e0c74fa361da7 (patch) | |
tree | b476525aa6e9550401baaece6e4c652ad9ee1e47 /fastboot/usb_linux.cpp | |
parent | 89cc750e9b2623aae3c257ce6c72f4ffe3e1bb33 (diff) |
Clean up the locking in usb_linux.cpp.
tsan complained that usb_bulk_write accesses usb_handle members outside
a lock. Fix that, but by moving everything over to C++11 locking.
Note that the old code was checking whether pthread_cond_timedwait returned
a negative value, which it will never do --- it will signal timeout (or
any other error) by returning a positive errno value. The rewrite does
what they appeared to intend to do (break out on timeout), rather than
what they actually did (keep trying forever).
Bug: http://b/22598587
Change-Id: Iab6869ffed4874143a7da97193d6b09e34cf2933
Diffstat (limited to 'fastboot/usb_linux.cpp')
0 files changed, 0 insertions, 0 deletions