Perform libusb_submit_transfer under the write variant of cgusb_fd_lock
Keep a global counter of how many async usb transfers are in place.
Keep the libusb event handle polling thread active until there are no async usb transfers in progress.
Merge branch 'master' of github.com:ckolivas/cgminer
Don't attempt to disable curses or print a summary during an app restart to prevent deadlocks.
Create a linked list of potentially cancellable usb transfers.
Pass the cancellable option to _usb_read options to decide on whether to add usb transfers to the list of cancellable transfers.
Alter the usb cancellable list only under cgusb_fd_lock write lock.
Specifically set the cancellable state for it to not be uninitialised in the usb transfer struct.
Add wrappers for usb_read_cancellable and usb_read_timeout_cancellable
Don't bother having a separate cancellable transfer struct for usb transfers, simply include the list in the usb_transfer struct.
Cancel cancellable usb transfers on work restart messages.
Use cancellable transfers on bitfury device.
Add usb transfer cancellation on shutdown and documentation regarding where cancellable transfers are suitable.
Add a usb_read_ii_timeout_cancellable wrapper
Use cancellable usb transfers in the icarus driver to avoid having to loop and poll when waiting for a response and to speed up work restart response time.
Check for presence of thr in icarus get nonce for startup nonce testing to work.
Add cancellable transfers correctly to the ct_list
Provide a mechanism for informing drivers of updated work templates for stratum and gbt mining.
Use a linked list for all usb transfers instead of just cancellable ones.