Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(907)

Unified Diff: third_party/libusb/src/libusb/core.c

Issue 16316004: Separate usb device handle from usb device. (deprecate) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the threading mess Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libusb/libusb_send_event.patch ('k') | third_party/libusb/src/libusb/libusb.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libusb/src/libusb/core.c
diff --git a/third_party/libusb/src/libusb/core.c b/third_party/libusb/src/libusb/core.c
index a91c77b968635ca8233b17c89b3b2607c52c5001..5512bd8c9b5073fc151c10d0da9b3b3b8534d065 100644
--- a/third_party/libusb/src/libusb/core.c
+++ b/third_party/libusb/src/libusb/core.c
@@ -1664,6 +1664,15 @@ void API_EXPORTED libusb_exit(struct libusb_context *ctx)
free(ctx);
}
+/*
+ * Interrupt libusb_handle_events_timeout_completed.
+ */
+void API_EXPORTED libusb_send_event(struct libusb_context *ctx) {
+ unsigned char dummy = 1;
+ USBI_GET_CONTEXT(ctx);
+ usbi_write(ctx->ctrl_pipe[1], &dummy, sizeof(dummy));
+}
+
/** \ingroup misc
* Check if the running library has a given capability.
*
« no previous file with comments | « third_party/libusb/libusb_send_event.patch ('k') | third_party/libusb/src/libusb/libusb.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698