1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00
VILLASnode/fpga/lib
daniel-k 68c9f08457 plugin: use Nifty Counter Idiom to intialize plugin list
Just using a standard std::list<> to hold plugins is problematic, because
we want to push Plugins to the list from within each Plugin's constructor
that is executed during static initialization. Since the order of static
initialization is undefined in C++, it may happen that a Plugin
constructor is executed before the list could be initialized. Therefore,
we use the Nifty Counter Idiom [1] to initialize the list ourself before
the first usage.

In short:
- allocate a buffer for the list
- initialize list before first usage
- (complicatedly) declaring a buffer is neccessary in order to avoid
  that the constructor of the static list is executed again
2018-01-10 11:02:08 +01:00
..
ips re-add old interrupt controller to make project compile again 2018-01-10 11:02:08 +01:00
kernel simple renames to not use reserved names 2018-01-10 11:02:08 +01:00
card.c simple renames to not use reserved names 2018-01-10 11:02:08 +01:00
CMakeLists.txt re-add old interrupt controller to make project compile again 2018-01-10 11:02:08 +01:00
ip.c imported source code from VILLASfpga repo and made it compile 2017-11-21 21:31:08 +01:00
ip.cpp first port to C++ of plugin and fpga ip infrastructure 2018-01-10 11:02:08 +01:00
list.c imported source code from VILLASfpga repo and made it compile 2017-11-21 21:31:08 +01:00
log.c make linking of the lib work by using old C-symbols until replaced 2018-01-10 11:02:08 +01:00
log_config.c imported source code from VILLASfpga repo and made it compile 2017-11-21 21:31:08 +01:00
log_helper.c imported source code from VILLASfpga repo and made it compile 2017-11-21 21:31:08 +01:00
plugin.c imported source code from VILLASfpga repo and made it compile 2017-11-21 21:31:08 +01:00
plugin.cpp plugin: use Nifty Counter Idiom to intialize plugin list 2018-01-10 11:02:08 +01:00
utils.c imported source code from VILLASfpga repo and made it compile 2017-11-21 21:31:08 +01:00
vlnv.c imported source code from VILLASfpga repo and made it compile 2017-11-21 21:31:08 +01:00
vlnv.cpp make linking of the lib work by using old C-symbols until replaced 2018-01-10 11:02:08 +01:00