Please sign in to comment.
Use separate libusb contexts to avoid thread safety issues
Unfortunately, it appears that using libusb's synchronous transfer API from several threads causes nasty race conditions in event handling and can lead to deadlocks, despite the fact that libusb's synchronous API is documented to be perfectly fine to use from several threads (only the manual polling functionality is supposed to require special precautions). Since usbdk was the only real reason for using a single libusb context and since usbdk (currently) has so many issues with Dolphin, I think dropping support for it in order to fix other backends is acceptable.
- Loading branch information...
Showing with 16 additions and 26 deletions.
- +2 −4 Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp
- +2 −0 Source/Core/Core/IOS/USB/Bluetooth/BTReal.h
- +2 −4 Source/Core/Core/IOS/USB/Host.cpp
- +2 −0 Source/Core/Core/IOS/USB/Host.h
- +0 −6 Source/Core/Core/LibusbUtils.cpp
- +0 −5 Source/Core/Core/LibusbUtils.h
- +7 −6 Source/Core/InputCommon/GCAdapter.cpp
- +1 −1 Source/Core/UICommon/USBUtils.cpp