Windows: Hash table improvements
authorChris Dickens <christopher.a.dickens@gmail.com>
Thu, 12 Jan 2017 20:46:18 +0000 (12:46 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Thu, 12 Jan 2017 23:03:37 +0000 (15:03 -0800)
commitcf1db52fbd519ba790ba734fd3d56ac6b497ec39
treefe33236f64f2fc77bdda07f447522c21c5cb39d1
parent9417868d949bc76b0f1f62eedc785bb85192623c
Windows: Hash table improvements

1) The current implementation was not entirely thread-safe. The hash
   table was read outside of the mutex, which in some cases could lead
   to improper hashing.
2) The hash creation function accepted a size parameter that was
   hard-coded. Eliminating this saves time because we can ensure that
   the pre-defined size is a prime number instead of requiring code to
   calculate a prime number.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/windows_nt_common.c
libusb/version_nano.h