diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2018-01-03 21:18:02 -0800 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2018-01-03 23:24:27 -0800 |
commit | 4be320236ec485dd32ada1b85d4c0551274d1f8a (patch) | |
tree | fddb9d2d5e6fa1e18d4ebdfdf5a0b6b684c97dfd /libusb/version_nano.h | |
parent | 3001f934776c5bb61a735fe676c3d82e69c47868 (diff) | |
download | libusb-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/version_nano.h')
-rw-r--r-- | libusb/version_nano.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/version_nano.h b/libusb/version_nano.h index da66a9e..81fca8b 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11245 +#define LIBUSB_NANO 11246 |