diff options
author | Daniel Drake <dsd@gentoo.org> | 2008-06-24 21:31:13 -0500 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2008-06-24 21:31:13 -0500 |
commit | 9818151c60a85aea6af24cb0996a92c3726c9864 (patch) | |
tree | 182d18b28c609ebafdc490bc06563a75d4f70750 /libusb/io.c | |
parent | d5f82893fab3f1c13b1af4ba17aac72479bad7d5 (diff) | |
download | libusb-9818151c60a85aea6af24cb0996a92c3726c9864.tar.gz |
Revert "Temporary workaround for event handling serialization issue"
This reverts commit 2d3a1111caff40ebb87983c861ff548cdc9e5946.
This was based on the assumption that dying threads would automatically
release mutexes, which is not the case.
Diffstat (limited to 'libusb/io.c')
-rw-r--r-- | libusb/io.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/libusb/io.c b/libusb/io.c index 9760432..5f3d617 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -1196,21 +1196,7 @@ API_EXPORTED void libusb_unlock_events(void) */ API_EXPORTED int libusb_event_handler_active(void) { - int r; - - if (!event_handler_active) - return 0; - - /* FIXME: temporary hack to ensure thread didn't quit (e.g. due to signal) - * without libusb_unlock_events being triggered */ - r = pthread_mutex_trylock(&events_lock); - if (r == 0) { - event_handler_active = 0; - pthread_mutex_unlock(&events_lock); - return 0; - } - - return 1; + return event_handler_active; } /** \ingroup poll |