1 //
2 // Copyright 2019 Ettus Research, a National Instruments Brand
3 //
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 //
6 
7 #include <uhdlib/rfnoc/device_id.hpp>
8 #include <atomic>
9 
10 using namespace uhd::rfnoc;
11 
allocate_device_id()12 device_id_t uhd::rfnoc::allocate_device_id()
13 {
14     static std::atomic<device_id_t> counter{1};
15     return counter++;
16 }
17