Commit graph

2 commits

Author SHA1 Message Date
Vanya A. Sergeev
562243c80d libbladeRF: refactor codebase for multi-board support
Includes fixups for clean rebase atop bladeRF commit 8b420eb
2017-12-15 18:15:06 -05:00
Jon Szymaniak
7b0cc24f95 libbladeRF: Introduced thread-safety to the API
Top-level API functions now acquire a per-device "control lock" before
performing control, programming, and low-level access operations.
(Specifically, these are the functions that manipulate the device handle
and utilize the FX3 <-> FPGA UART.)

Synchronous data transfer functions now hold a per-device, per-module
"sync lock" to ensure these operations are carried out atomically. The
control lock is also held during sync configuration, as upcoming changes
to introduce metadata support will require flipping some config bits on
the FPGA during this operation.

Only these top-level functions shall acquire these locks; the core logic
code should be able to assume that locks are already acquired.

To alleviate confusion, functions that are *not* part of the API, and
therefore are safe to call within the core logic, are stripped of the
bladerf_ prefix.

Now that pthreads is a required dependency, use of the sync API is
is no longer marked optional in the libbladeRF build.
ENABLE_LIBBLADERF_SYNC and related items have been removed from the
CMake build.
2014-08-02 19:22:49 -04:00