aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/utils/atomic.hpp
Commit message (Collapse)AuthorAgeFilesLines
* lib: Make simple_claimer atomicMartin Braun2022-01-141-38/+19
| | | | | | | | | | | | | | | This fixes multiple issues: - The simple_claimer was not truly atomic, it tested and set the locked-flag on separate lines - It used a Boost yield statement, although we're not running Boost threads - It used the deprecated UHD_INLINE macro We also remove spin_wait_with_timeout(), which was only used in claim_with_wait() because it's not worth putting into its own function. This is no API change on simple_claimer, but it may result in different performance of this spinlock.
* uhd: Replace include guards with pragma onceLane Kolbly2020-04-081-4/+1
| | | | | Pragma once is the more modern version of include guards, eliminating any potential problems with mistyping include guards. Let's use those.
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-031-48/+51
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* lib: Replace uhd::get_system_time() with steady_clockMartin Braun2019-11-261-3/+4
| | | | | | Benchmarks show that using C++ chrono features beats uhd::get_system_time(), and the latter is simply not appropriate unless a uhd::time_spec_t is required.
* lib: move atomic.hpp and system_time.hpp to uhdlibMartin Braun2018-04-061-0/+74