Home
last modified time | relevance | path

Searched refs:itransfer (Results 1 – 18 of 18) sorted by relevance

/third_party/libusb/libusb/
Dio.c1242 static void calculate_timeout(struct usbi_transfer *itransfer) in calculate_timeout() argument
1245 USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer)->timeout; in calculate_timeout()
1248 TIMESPEC_CLEAR(&itransfer->timeout); in calculate_timeout()
1252 usbi_get_monotonic_time(&itransfer->timeout); in calculate_timeout()
1254 itransfer->timeout.tv_sec += timeout / 1000U; in calculate_timeout()
1255 itransfer->timeout.tv_nsec += (timeout % 1000U) * 1000000L; in calculate_timeout()
1256 if (itransfer->timeout.tv_nsec >= NSEC_PER_SEC) { in calculate_timeout()
1257 ++itransfer->timeout.tv_sec; in calculate_timeout()
1258 itransfer->timeout.tv_nsec -= NSEC_PER_SEC; in calculate_timeout()
1292 struct usbi_transfer *itransfer; in libusb_alloc_transfer() local
[all …]
Dlibusbi.h306 #define ITRANSFER_CTX(itransfer) \ argument
307 (TRANSFER_CTX(USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer)))
573 #define USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer) \ argument
575 ((unsigned char *)(itransfer) \
679 int usbi_handle_transfer_completion(struct usbi_transfer *itransfer,
681 int usbi_handle_transfer_cancellation(struct usbi_transfer *itransfer);
682 void usbi_signal_transfer_completion(struct usbi_transfer *itransfer);
759 static inline void *usbi_get_transfer_priv(struct usbi_transfer *itransfer) in usbi_get_transfer_priv() argument
761 return itransfer->priv; in usbi_get_transfer_priv()
1222 int (*submit_transfer)(struct usbi_transfer *itransfer);
[all …]
Dcore.c1395 struct usbi_transfer *itransfer; in do_close() local
1402 for_each_transfer_safe(ctx, itransfer, tmp) { in do_close()
1404 USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in do_close()
1409 usbi_mutex_lock(&itransfer->lock); in do_close()
1410 if (!(itransfer->state_flags & USBI_TRANSFER_DEVICE_DISAPPEARED)) { in do_close()
1413 if (itransfer->state_flags & USBI_TRANSFER_CANCELLING) in do_close()
1418 usbi_mutex_unlock(&itransfer->lock); in do_close()
1424 list_del(&itransfer->list); in do_close()
/third_party/libusb/libusb/os/
Dhaiku_usb_raw.cpp140 haiku_submit_transfer(struct usbi_transfer *itransfer) in haiku_submit_transfer() argument
142 struct libusb_transfer *fLibusbTransfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in haiku_submit_transfer()
144 return fDeviceHandle->SubmitTransfer(itransfer); in haiku_submit_transfer()
148 haiku_cancel_transfer(struct usbi_transfer *itransfer) in haiku_cancel_transfer() argument
150 struct libusb_transfer *fLibusbTransfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in haiku_cancel_transfer()
152 return fDeviceHandle->CancelTransfer(*((USBTransfer **)usbi_get_transfer_priv(itransfer))); in haiku_cancel_transfer()
156 haiku_handle_transfer_completion(struct usbi_transfer *itransfer) in haiku_handle_transfer_completion() argument
158 USBTransfer **pTransfer = (USBTransfer **)usbi_get_transfer_priv(itransfer); in haiku_handle_transfer_completion()
161 usbi_mutex_lock(&itransfer->lock); in haiku_handle_transfer_completion()
165 usbi_mutex_unlock(&itransfer->lock); in haiku_handle_transfer_completion()
[all …]
Dwindows_usbdk.c513 static void usbdk_clear_transfer_priv(struct usbi_transfer *itransfer) in usbdk_clear_transfer_priv() argument
515 struct usbdk_transfer_priv *transfer_priv = get_usbdk_transfer_priv(itransfer); in usbdk_clear_transfer_priv()
516 struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in usbdk_clear_transfer_priv()
524 static int usbdk_do_control_transfer(struct usbi_transfer *itransfer) in usbdk_do_control_transfer() argument
526 struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in usbdk_do_control_transfer()
528 struct usbdk_transfer_priv *transfer_priv = get_usbdk_transfer_priv(itransfer); in usbdk_do_control_transfer()
529 OVERLAPPED *overlapped = get_transfer_priv_overlapped(itransfer); in usbdk_do_control_transfer()
536 set_transfer_priv_handle(itransfer, priv->system_handle); in usbdk_do_control_transfer()
545 …windows_force_sync_completion(itransfer, (ULONG)transfer_priv->request.Result.GenResult.BytesTrans… in usbdk_do_control_transfer()
557 static int usbdk_do_bulk_transfer(struct usbi_transfer *itransfer) in usbdk_do_bulk_transfer() argument
[all …]
Dlinux_usbfs.c1830 static int discard_urbs(struct usbi_transfer *itransfer, int first, int last_plus_one) in discard_urbs() argument
1833 USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in discard_urbs()
1834 struct linux_transfer_priv *tpriv = usbi_get_transfer_priv(itransfer); in discard_urbs()
1880 static int submit_bulk_transfer(struct usbi_transfer *itransfer) in submit_bulk_transfer() argument
1883 USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in submit_bulk_transfer()
1884 struct linux_transfer_priv *tpriv = usbi_get_transfer_priv(itransfer); in submit_bulk_transfer()
1958 urb->usercontext = itransfer; in submit_bulk_transfer()
1966 urb->stream_id = itransfer->stream_id; in submit_bulk_transfer()
2042 discard_urbs(itransfer, 0, i); in submit_bulk_transfer()
2052 static int submit_iso_transfer(struct usbi_transfer *itransfer) in submit_iso_transfer() argument
[all …]
Dwindows_common.c295 void windows_force_sync_completion(struct usbi_transfer *itransfer, ULONG size) in windows_force_sync_completion() argument
297 struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in windows_force_sync_completion()
299 struct windows_transfer_priv *transfer_priv = usbi_get_transfer_priv(itransfer); in windows_force_sync_completion()
425 struct usbi_transfer *itransfer; in windows_iocp_thread() local
467itransfer = (struct usbi_transfer *)((unsigned char *)transfer_priv + PTR_ALIGN(sizeof(*transfer_p… in windows_iocp_thread()
469 USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer), ULONG_CAST(num_bytes)); in windows_iocp_thread()
470 usbi_signal_transfer_completion(itransfer); in windows_iocp_thread()
729 static int windows_submit_transfer(struct usbi_transfer *itransfer) in windows_submit_transfer() argument
731 struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in windows_submit_transfer()
736 struct windows_transfer_priv *transfer_priv = usbi_get_transfer_priv(itransfer); in windows_submit_transfer()
[all …]
Dwindows_common.h322 int (*submit_transfer)(struct usbi_transfer *itransfer);
323 int (*cancel_transfer)(struct usbi_transfer *itransfer);
324 void (*clear_transfer_priv)(struct usbi_transfer *itransfer);
325 enum libusb_transfer_status (*copy_transfer_data)(struct usbi_transfer *itransfer, DWORD length);
369 static inline OVERLAPPED *get_transfer_priv_overlapped(struct usbi_transfer *itransfer) in get_transfer_priv_overlapped() argument
371 struct windows_transfer_priv *transfer_priv = usbi_get_transfer_priv(itransfer); in get_transfer_priv_overlapped()
375 static inline void set_transfer_priv_handle(struct usbi_transfer *itransfer, HANDLE handle) in set_transfer_priv_handle() argument
377 struct windows_transfer_priv *transfer_priv = usbi_get_transfer_priv(itransfer); in set_transfer_priv_handle()
381 static inline struct usbdk_transfer_priv *get_usbdk_transfer_priv(struct usbi_transfer *itransfer) in get_usbdk_transfer_priv() argument
383 struct windows_transfer_priv *transfer_priv = usbi_get_transfer_priv(itransfer); in get_usbdk_transfer_priv()
[all …]
Dnetbsd_usb.c385 netbsd_submit_transfer(struct usbi_transfer *itransfer) in netbsd_submit_transfer() argument
392 transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in netbsd_submit_transfer()
396 err = _sync_control_transfer(itransfer); in netbsd_submit_transfer()
404 err = _sync_gen_transfer(itransfer); in netbsd_submit_transfer()
413 err = _sync_gen_transfer(itransfer); in netbsd_submit_transfer()
423 usbi_signal_transfer_completion(itransfer); in netbsd_submit_transfer()
429 netbsd_cancel_transfer(struct usbi_transfer *itransfer) in netbsd_cancel_transfer() argument
431 UNUSED(itransfer); in netbsd_cancel_transfer()
439 netbsd_handle_transfer_completion(struct usbi_transfer *itransfer) in netbsd_handle_transfer_completion() argument
441 return usbi_handle_transfer_completion(itransfer, LIBUSB_TRANSFER_COMPLETED); in netbsd_handle_transfer_completion()
[all …]
Ddarwin_usb.c1767 static int submit_bulk_transfer(struct usbi_transfer *itransfer) { in submit_bulk_transfer() argument
1768 struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in submit_bulk_transfer()
1815 … (UInt32)transfer->length, darwin_async_io_callback, itransfer); in submit_bulk_transfer()
1818 … (UInt32)transfer->length, darwin_async_io_callback, itransfer); in submit_bulk_transfer()
1820 itransfer->timeout_flags |= USBI_TRANSFER_OS_HANDLES_TIMEOUT; in submit_bulk_transfer()
1825 darwin_async_io_callback, itransfer); in submit_bulk_transfer()
1829 darwin_async_io_callback, itransfer); in submit_bulk_transfer()
1840 static int submit_stream_transfer(struct usbi_transfer *itransfer) { in submit_stream_transfer() argument
1841 struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in submit_stream_transfer()
1852 itransfer->timeout_flags |= USBI_TRANSFER_OS_HANDLES_TIMEOUT; in submit_stream_transfer()
[all …]
Dopenbsd_usb.c423 obsd_submit_transfer(struct usbi_transfer *itransfer) in obsd_submit_transfer() argument
430 transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in obsd_submit_transfer()
434 err = _sync_control_transfer(itransfer); in obsd_submit_transfer()
442 err = _sync_gen_transfer(itransfer); in obsd_submit_transfer()
451 err = _sync_gen_transfer(itransfer); in obsd_submit_transfer()
461 usbi_signal_transfer_completion(itransfer); in obsd_submit_transfer()
467 obsd_cancel_transfer(struct usbi_transfer *itransfer) in obsd_cancel_transfer() argument
469 UNUSED(itransfer); in obsd_cancel_transfer()
477 obsd_handle_transfer_completion(struct usbi_transfer *itransfer) in obsd_handle_transfer_completion() argument
479 return usbi_handle_transfer_completion(itransfer, LIBUSB_TRANSFER_COMPLETED); in obsd_handle_transfer_completion()
[all …]
Dwindows_winusb.c58 static int winusbx_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer);
60 static int winusbx_submit_iso_transfer(int sub_api, struct usbi_transfer *itransfer);
61 static int winusbx_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer);
63 static int winusbx_cancel_transfer(int sub_api, struct usbi_transfer *itransfer);
65 …sfer_status winusbx_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, DWORD length);
74 static int hid_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer);
75 static int hid_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer);
78 …transfer_status hid_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, DWORD length);
85 static int composite_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer);
86 static int composite_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer);
[all …]
Dnull_usb.c85 null_submit_transfer(struct usbi_transfer *itransfer) in null_submit_transfer() argument
91 null_cancel_transfer(struct usbi_transfer *itransfer) in null_cancel_transfer() argument
Dhaiku_usb_backend.cpp34 USBTransfer::USBTransfer(struct usbi_transfer *itransfer, USBDevice *device) in USBTransfer() argument
36 fUsbiTransfer = itransfer; in USBTransfer()
37 fLibusbTransfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in USBTransfer()
201 USBDeviceHandle::SubmitTransfer(struct usbi_transfer *itransfer) in SubmitTransfer() argument
203 USBTransfer *transfer = new USBTransfer(itransfer, fUSBDevice); in SubmitTransfer()
204 *((USBTransfer **)usbi_get_transfer_priv(itransfer)) = transfer; in SubmitTransfer()
Dwindows_winusb.h107 int (*submit_bulk_transfer)(int sub_api, struct usbi_transfer *itransfer);
108 int (*submit_iso_transfer)(int sub_api, struct usbi_transfer *itransfer);
109 int (*submit_control_transfer)(int sub_api, struct usbi_transfer *itransfer);
110 int (*cancel_transfer)(int sub_api, struct usbi_transfer *itransfer);
111 …enum libusb_transfer_status (*copy_transfer_data)(int sub_api, struct usbi_transfer *itransfer, DW…
Dsunos_usb.c1371 sunos_submit_transfer(struct usbi_transfer *itransfer) in sunos_submit_transfer() argument
1377 transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in sunos_submit_transfer()
1421 sunos_cancel_transfer(struct usbi_transfer *itransfer) in sunos_cancel_transfer() argument
1430 tpriv = usbi_get_transfer_priv(itransfer); in sunos_cancel_transfer()
1432 transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in sunos_cancel_transfer()
1456 sunos_handle_transfer_completion(struct usbi_transfer *itransfer) in sunos_handle_transfer_completion() argument
1458 return usbi_handle_transfer_completion(itransfer, LIBUSB_TRANSFER_COMPLETED); in sunos_handle_transfer_completion()
/third_party/mesa3d/src/gallium/drivers/i915/
Di915_resource_texture.c869 struct i915_transfer *itransfer = (struct i915_transfer *)transfer; in i915_texture_transfer_unmap() local
870 struct i915_texture *tex = i915_texture(itransfer->b.resource); in i915_texture_transfer_unmap()
873 if (itransfer->staging_texture) in i915_texture_transfer_unmap()
874 tex = i915_texture(itransfer->staging_texture); in i915_texture_transfer_unmap()
878 if ((itransfer->staging_texture) && (transfer->usage & PIPE_MAP_WRITE)) { in i915_texture_transfer_unmap()
881 u_box_origin_2d(itransfer->b.box.width, itransfer->b.box.height, &sbox); in i915_texture_transfer_unmap()
882 pipe->resource_copy_region(pipe, itransfer->b.resource, in i915_texture_transfer_unmap()
883 itransfer->b.level, itransfer->b.box.x, in i915_texture_transfer_unmap()
884 itransfer->b.box.y, itransfer->b.box.z, in i915_texture_transfer_unmap()
885 itransfer->staging_texture, 0, &sbox); in i915_texture_transfer_unmap()
[all …]
/third_party/mesa3d/src/mesa/state_tracker/
Dst_cb_texture.c591 struct st_texture_image_transfer *itransfer = &stImage->transfer[z]; in st_MapTextureImage() local
597 unsigned stride = *rowStrideOut = itransfer->temp_stride = in st_MapTextureImage()
602 *mapOut = itransfer->temp_data = in st_MapTextureImage()
606 itransfer->map = map; in st_MapTextureImage()
634 struct st_texture_image_transfer *itransfer = &stImage->transfer[z]; in st_UnmapTextureImage() local
635 struct pipe_transfer *transfer = itransfer->transfer; in st_UnmapTextureImage()
651 itransfer->temp_data, in st_UnmapTextureImage()
652 itransfer->temp_stride, in st_UnmapTextureImage()
659 itransfer->temp_data, in st_UnmapTextureImage()
660 itransfer->temp_stride, in st_UnmapTextureImage()
[all …]