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

Side by Side Diff: third_party/libusb/libusb_send_event.patch

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, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/libusb/README.chromium ('k') | third_party/libusb/src/libusb/core.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff --git a/third_party/libusb/src/libusb/core.c b/third_party/libusb/src/libus b/core.c
2 index a91c77b..5512bd8 100644
3 --- a/third_party/libusb/src/libusb/core.c
4 +++ b/third_party/libusb/src/libusb/core.c
5 @@ -1664,6 +1664,15 @@ void API_EXPORTED libusb_exit(struct libusb_context *ctx)
6 free(ctx);
7 }
8
9 +/*
10 + * Interrupt libusb_handle_events_timeout_completed.
11 + */
12 +void API_EXPORTED libusb_send_event(struct libusb_context *ctx) {
13 + unsigned char dummy = 1;
14 + USBI_GET_CONTEXT(ctx);
15 + usbi_write(ctx->ctrl_pipe[1], &dummy, sizeof(dummy));
16 +}
17 +
18 /** \ingroup misc
19 * Check if the running library has a given capability.
20 *
21 diff --git a/third_party/libusb/src/libusb/libusb.h b/third_party/libusb/src/lib usb/libusb.h
22 index beff229..fdf0b4d 100644
23 --- a/third_party/libusb/src/libusb/libusb.h
24 +++ b/third_party/libusb/src/libusb/libusb.h
25 @@ -1350,6 +1350,11 @@ int LIBUSB_CALL libusb_pollfds_handle_timeouts(libusb_con text *ctx);
26 int LIBUSB_CALL libusb_get_next_timeout(libusb_context *ctx,
27 struct timeval *tv);
28
29 +/**
30 + * Interrupt libusb_handle_events_timeout_completed.
31 + */
32 +void LIBUSB_CALL libusb_send_event(struct libusb_context *ctx);
33 +
34 /** \ingroup poll
35 * File descriptor for polling
36 */
OLDNEW
« no previous file with comments | « third_party/libusb/README.chromium ('k') | third_party/libusb/src/libusb/core.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698