summaryrefslogtreecommitdiff
path: root/libusb/os/windows_winusb.h
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2018-01-03 21:18:02 -0800
committerChris Dickens <christopher.a.dickens@gmail.com>2018-01-03 23:24:27 -0800
commit4be320236ec485dd32ada1b85d4c0551274d1f8a (patch)
treefddb9d2d5e6fa1e18d4ebdfdf5a0b6b684c97dfd /libusb/os/windows_winusb.h
parent3001f934776c5bb61a735fe676c3d82e69c47868 (diff)
downloadlibusb-4be320236ec485dd32ada1b85d4c0551274d1f8a.tar.gz
Windows: Improve locking in threading abstraction
Convert the usbi_mutex_t type to a CRITICAL_SECTION object. There are numerous advantages including lower resource usage and a better fast-path (doesn't require entering kernel space). Simplify the condition variable implementation by not associating a wait structure with a particular thread ID. This is not needed and causes an unnecessary search through the linked list of any available wait structures when the real optimization is just reusing an already created event object. Also, while here remove all the checks for NULL pointers because we don't do such a silly thing inside the library. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'libusb/os/windows_winusb.h')
0 files changed, 0 insertions, 0 deletions