projects
/
platform
/
upstream
/
libusb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Darwin: Fix incorrect mutex protection of libusb_darwin_acfl global
[platform/upstream/libusb.git]
/
libusb
/
os
/
darwin_usb.c
diff --git
a/libusb/os/darwin_usb.c
b/libusb/os/darwin_usb.c
index
58c4c88
..
f092562
100644
(file)
--- a/
libusb/os/darwin_usb.c
+++ b/
libusb/os/darwin_usb.c
@@
-358,11
+358,9
@@
static void *event_thread_main (void *arg0) {
usbi_info (ctx, "thread ready to receive events");
usbi_info (ctx, "thread ready to receive events");
- /* let the main thread know about the async runloop */
- libusb_darwin_acfl = runloop;
-
/* signal the main thread */
pthread_mutex_lock (&libusb_darwin_at_mutex);
/* signal the main thread */
pthread_mutex_lock (&libusb_darwin_at_mutex);
+ libusb_darwin_acfl = runloop;
pthread_cond_signal (&libusb_darwin_at_cond);
pthread_mutex_unlock (&libusb_darwin_at_mutex);
pthread_cond_signal (&libusb_darwin_at_cond);
pthread_mutex_unlock (&libusb_darwin_at_mutex);