distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
BIND_LOW_LEVEL_PREINITIALIZER.h File Reference

BIND_LOW_LEVEL_PREINITIALIZER() macro. More...

Include dependency graph for BIND_LOW_LEVEL_PREINITIALIZER.h:

Go to the source code of this file.

Macros

#define BIND_LOW_LEVEL_PREINITIALIZER(priority, function)   BIND_LOW_LEVEL_INITIALIZER_IMPLEMENTATION(priority, function, ".low_level_preinitializers.")
 Binds function as low-level preinitializer with specified priority. More...
 

Detailed Description

BIND_LOW_LEVEL_PREINITIALIZER() macro.

Author
Copyright (C) 2018-2019 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Macro Definition Documentation

◆ BIND_LOW_LEVEL_PREINITIALIZER

#define BIND_LOW_LEVEL_PREINITIALIZER (   priority,
  function 
)    BIND_LOW_LEVEL_INITIALIZER_IMPLEMENTATION(priority, function, ".low_level_preinitializers.")

Binds function as low-level preinitializer with specified priority.

Low-level preinitializers are executed before .bss and .data sections' initialization, before constructors for global and static objects. They are automatically executed in ascending order of priority. When there is a group of multiple low-level preinitializers with the same priority, the execution order within that group is unspecified.

Parameters
[in]priorityis the priority of the low-level preinitializer, [0; 99]
[in]functionis the low-level preinitializer function