core: Change event handling lock to traditional (non-recursive) type
authorChris Dickens <christopher.a.dickens@gmail.com>
Mon, 26 Oct 2015 13:11:53 +0000 (14:11 +0100)
committerNathan Hjelm <hjelmn@me.com>
Wed, 17 Aug 2016 18:52:40 +0000 (12:52 -0600)
commita5302ff86db391e6797a32693c242ddade5a09c2
tree26d3f89d9dfa8ea65e9570e70357b3d45091d88c
parent2682e21d3d7e1e5ebd6dfe07f193efe48caa3e14
core: Change event handling lock to traditional (non-recursive) type

The event handling lock was previously required to be of the recursive
type because the libusb_close() path requires the lock and may be
called by a thread that is handling events (e.g. from within a
transfer or hotplug callback). With commit 960a6e75, it is possible to
determine whether the current function is being called from an event
handling context, thus the recursive lock type is no longer necessary.

References:
* http://libusb.org/ticket/82
74282582cc879f091ad1d847411337bc3fa78a2b
c775c2f43037cd235b65410583179195e25f9c4a

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
[hdegoede@redhat.com: rebase on top of current master]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
libusb/core.c
libusb/io.c
libusb/os/threads_posix.c
libusb/os/threads_posix.h
libusb/os/threads_windows.h
libusb/version_nano.h