Commit graph

59 commits

Author SHA1 Message Date
Ben Hilburn
178ac3f1c9 Merging USRP X300 and X310 support!! 2014-02-04 11:04:07 -08:00
Michael West
39d69b3a88 BUG #183: Addressed comments from code review. 2013-11-19 11:16:44 -08:00
Moritz Fischer
7961fc2388 BUG #183: Fixed typo
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2013-11-11 10:52:50 +01:00
Michael West
597e7965a7 BUG #183: B200 High CPU Usage: Created a single thread to handle libusb events and expanded packet size to 16k 2013-11-08 15:30:03 -08:00
Josh Blum
6553047fca usb: squashed thread related changes 2013-07-19 12:38:08 -07:00
Josh Blum
f6dd15477d usb: useful error messages on failed submit 2013-07-16 12:30:04 -07:00
Josh Blum
d39020b236 usb: check for and use libusb_handle_events_timeout_completed 2013-03-11 11:30:37 -07:00
Josh Blum
83063ea8b1 usb: use int for completed to match libusb example code 2013-03-11 10:40:39 -07:00
Josh Blum
d18fc6f0f1 usb: added recv buffer flushing to libusb zero copy 2012-08-04 14:22:09 -04:00
Josh Blum
253be8f0da uhd: squashed transport work 2012-04-23 13:45:23 -07:00
Josh Blum
b7ff81c9a8 dsp rework: work on usb wrapper for smaller packets, large luts 2012-02-02 15:15:54 -08:00
Josh Blum
c35462adaf usb: added interface args to usb abstractions 2011-09-19 16:14:12 -07:00
Josh Blum
833da5c1ee usb: reimplement ~libusb_zero_copy_impl to avoid segfaults and indefinite timeouts 2011-09-02 14:08:01 -07:00
Josh Blum
acf92e8356 usb: removed handler thread, do work in get buffer calls 2011-09-02 11:54:57 -07:00
Josh Blum
7e1b2a0e3c uhd: added tasks to simplify thread spawning use cases 2011-07-13 17:25:40 -07:00
Josh Blum
927e795da3 uhd: replaced boolean for thread loop w/ boost::this_thread::interruption_requested 2011-06-16 11:50:05 -07:00
Josh Blum
5dfc458188 b100: added b100 host (squashed) 2011-06-14 17:56:54 -07:00
Josh Blum
ea5ce50a46 uhd: replace managed buffer shared pointer w/ intrusive pointer to reduce overhead 2011-05-14 20:28:20 -07:00
Josh Blum
c8dca30d72 uhd: replaced many conditional prints with UHD_LOG usage 2011-05-04 15:27:11 -07:00
Josh Blum
627075e60e uhd: move thread loop condition flag to before barrier (prevents race condition) 2011-04-22 17:02:07 -07:00
Josh Blum
d07870f698 usb: mark libusb callbacks with LIBUSB_CALL to ensure correct calling convention 2011-04-05 20:37:29 -07:00
Josh Blum
1c5076ea68 uhd: implemented boost barriers on all code that creates threads
The barrier ensures that the thread must spawn before the caller exits.

Some of the code already used a mutex to accomplish this,
however cygwin chokes when a mutex is locked twice by the same thread.
Mutex implementations were replaced with the barrier implementation.
Also the barrier implementation is far cleaner.
2011-03-31 15:00:56 -07:00
Josh Blum
fb2059949e usb: fix callback cast in libusb zero copy under msvc 2011-03-21 10:34:16 -07:00
Josh Blum
fc6280dffd Merge branch 'usb-cancel' into next
Conflicts:
	host/lib/transport/libusb1_zero_copy.cpp
2011-03-17 14:32:12 -07:00
Nick Foster
9d752805de USB zero copy impl: proper cleanup for canceled transfers -- wait for cancel before freeing 2011-03-16 10:31:52 -07:00
Josh Blum
09149bbf7d usrp1: safe destruction for usrp1 device 2011-03-10 14:37:34 -08:00
Josh Blum
16f08844d7 uhd: renamed the assert header to assert has
only the assert has implementation is in this header

uhd assert throw moved to the exception header

updated code base includes to match
2011-02-24 14:54:24 -08:00
Josh Blum
2af3e5c49d uhd: tweaks for windows msvc compiler warnings and errors 2011-02-16 17:19:54 -08:00
Josh Blum
9bc6fbe685 uhd: reusable buffers for libusb zero copy implementation
tweaks on udp implementation to simplify
2011-02-15 10:34:37 -08:00
Josh Blum
1be2590962 uhd: tweaks to bounded buffer
Added push with haste.
Call with haste first in the wait methods to avoid time compare/wait when not needed.
Added new calls to the libusb and udp zero copy impls
tests pass
2011-02-10 13:58:38 -08:00
Josh Blum
ef351624ee uhd: replace asio buffer in make safe w/ memory and length, makes things simpler 2011-02-07 12:32:12 -08:00
Josh Blum
ba2523fca4 uhd: removed instances of shared_from_this() in transports
Its known to be slow and using sptrs of large objects.
This should be a slight performance improvement
for libusb and usrp_e100_mmap implementation.
2011-02-05 12:44:23 -08:00
Josh Blum
5d10aa397f uhd: change bounded_buffer implementation and code using it
The bounded buffer now uses the detail idiom to hide implementation to inline better.
The whole sptr/make idiom was removed from bounded buffer to just construct directly.
The code using bounded buffer was changed for the new api:
replaces access operators and calls to the factory function.
2011-02-05 12:37:20 -08:00
Josh Blum
e13cf1a128 usb: restored disable_interruption on get_lut_with_wait (gets called externally) 2011-01-21 16:27:14 -08:00
Josh Blum
07710a5f68 usb: use thread interruption in usb zero copy on deconstruction 2011-01-17 14:01:35 -08:00
Josh Blum
a076dc12aa uhd: update copyright dates 2011-01-05 20:49:45 -08:00
Josh Blum
ed6a2941f8 uhd: created buffer pool to allocate aligned memory, and implemented in transports 2011-01-03 01:43:48 -08:00
Josh Blum
0fc641042e usb: moved event handler thread into the zero copy interface 2010-10-05 15:47:58 -07:00
Josh Blum
0cd5375b5c uhd: replaced frame params for the zero copy interfaces with a device address
the device address gives a key, value pair of infinite optional capabilities

added a cast option to the device address to cast string to type T

added call to the zero_copy_if to get send and recv frame sizes

changed the usrp2 impl to calculate recv/send spp from the data transport
2010-10-05 10:30:28 -07:00
Josh Blum
5bd863efa0 uhd: bounded buffer pop sets back element to empty to decrement references 2010-10-04 14:54:16 -07:00
Josh Blum
219183453b uhd: added include for enable_shared_from_this when used 2010-10-04 11:30:14 -07:00
Josh Blum
c6f17f1e2f uhd: changed buffer allocations to be in a single chunk, udp: pass frame sizes into the impl constructor 2010-10-03 19:34:41 -07:00
Josh Blum
b57c84b34b uhd: implemented udp zero copy asio with async calls 2010-10-03 01:41:24 -07:00
Josh Blum
7352c95037 uhd: reworked the zero copy interface
- recv buffers have a release call
- safe make function for recv buffers (buff + release callback)
- send buffer commits now have a void return
- safe make function for send buffers (buff + commit callback)

The reason for the void return from commit is that ssize_t num_bytes was never returning anything of use.
That is for all of the zero copy implementations so far, commit cannot really error (being asynchronous).

libusb zero copy impl was reworked to support the new interface.
USRP1 io_impl with the psuedo managed buffer was replaced with safe_make.
Also, usrp1 io_impl was simplified greatly due to commit returning void now.
UDP zero copy asio was disabled (in this commit, until its reworked).
Phony send and recv interfaces were removed completely.
2010-10-02 23:15:46 -07:00
Josh Blum
00cd601840 uhd: implemented a double timeout (in seconds) for send and recv chains
converted all size_t timeout_ms to double timeout

bounded and alignment buffer now take double timeout

added timeout to device::send and zero_copy_if::get_send_buff
2010-10-01 18:22:41 -07:00
Josh Blum
2c8a7c7deb uhd: implemented recv timeout for zero copy interface 2010-09-30 14:36:24 -07:00
Josh Blum
543a63648f usrp: transfer resize options and documentation 2010-09-29 15:41:33 -07:00
Josh Blum
2f62c39b71 uhd: fix warning by adding brackets for while(cond){}; 2010-09-27 11:35:28 -07:00
Josh Blum
86213f8de2 usb: disable thread interruption on wait calls 2010-09-26 20:54:58 -07:00
Josh Blum
0816925695 usb: zero copy work, multiple endpoints with single context, async io
Heavy work on the zero copy interface and endpoint wrappers to properly use the async io.
The global libusb session starts a thread to run the event handler,
the async callbacks push completed transfers onto a thread-safe bounded buffer.
The managed buffer creation routines use the bounded buffer to efficiently pop off completed transfers.

works on linux, throws a weird exception on cleanup
2010-09-26 20:23:23 -07:00