USRP Hardware Driver and USRP Manual  Version: 4.6.0.0-7-gece7c4811
UHD and USRP Manual
static.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2010-2011 Ettus Research LLC
3 // Copyright 2018 Ettus Research, a National Instruments Company
4 //
5 // SPDX-License-Identifier: GPL-3.0-or-later
6 //
7 
8 #pragma once
9 
10 #include <uhd/config.hpp>
11 
18 #define UHD_SINGLETON_FCN(_t, _x) \
19  static _t& _x() \
20  { \
21  static _t _x; \
22  return _x; \
23  }
24 
30 #define UHD_STATIC_BLOCK(_x) \
31  void _x(void); \
32  static _uhd_static_fixture _x##_fixture(&_x, #_x); \
33  void _x(void)
34 
37 {
38  _uhd_static_fixture(void (*)(void), const char*);
39 };
Helper for static block, constructor calls function.
Definition: static.hpp:36
#define UHD_API
Definition: config.h:87