P99

◆ P99_INIT_VARIABLE

#define P99_INIT_VARIABLE (   NAME,
  FUNC,
  NR 
)

Request that FUNC is to be called with argument &(NAME) at initialization time with priority NR.

Parameters
NAMEmust be an object with static storage duration. Its address is taken as a compile time constant expression.
FUNCmust be compatible to a function pointer of type void (*)(void*) and will be called equivalent to FUNC(&(NAME)).
NRmust be chosen uniquely in the range 0 .. P99_MAX_NUMBER. It can be omitted, in which case a low valued number is provided.
Warning
To ensure that NR is unique the file "p99_init.h" must be included before any usage of P99_INIT_FUNCTION_DECLARE
See also
P99_INIT_FUNCTION_DECLARE for the mechanism that is used to implement this feature.

Definition at line 179 of file p99_init.h.