PIP 6.1.0
Platform-Independent Primitives
Loading...
Searching...
No Matches
pibase_macros.h File Reference

Base macrosThis file declares basic useful macros for the PIP library including platform detection, compiler-specific configurations, and utility macros for private data handling. More...

#include "pip_defs.h"
#include "pip_version.h"
#include "piplatform.h"

Macros

#define PIMETA(...)
 Meta-information section for any entity. Parsing by pip_cmg and can be accessed by PICodeInfo. Contains sequence of key=value pairs, e.g.PIMETA(id=12345,tag="my string").
#define PIP_VERSION_MAJOR
 Major value of PIP version.
#define PIP_VERSION_MINOR
 Minor value of PIP version.
#define PIP_VERSION_REVISION
 Revision value of PIP version.
#define PIP_VERSION_SUFFIX
 Suffix of PIP version.
#define PIP_VERSION
 Version of PIP in hex - 0x##(Major)##(Minor)##(Revision).
#define PIP_DEBUG
 Macro is defined when compile-time debug is enabled.
#define WINDOWS
 Macro is defined when operation system is any Windows.
#define QNX
 Macro is defined when operation system is QNX or Blackberry.
#define BLACKBERRY
 Macro is defined when operation system is Blackberry.
#define FREE_BSD
 Macro is defined when operation system is FreeBSD.
#define MAC_OS
 Macro is defined when operation system is Mac OS.
#define ANDROID
 Macro is defined when operation system is Android.
#define LINUX
 Macro is defined when operation system is any Linux.
#define FREERTOS
 Macro is defined when operation system is FreeRTOS.
#define CC_GCC
 Macro is defined when compiler is GCC or MinGW.
#define HAS_LOCALE
 Macro is defined when PIP is decided that host is support language.
#define PIP_EMBEDDED
 Macro is defined when PIP is building for embedded systems.
#define CC_VC
 Macro is defined when compiler is Visual Studio.
#define CC_AVR_GCC
 Macro is defined when compiler is AVR GCC.
#define CC_OTHER
 Macro is defined when compiler is unknown.
#define PRIVATE_DECLARATION(export)
 Macro to declare private section, "export" is optional.
#define PRIVATE_DEFINITION_START(Class)
 Macro to start definition of private section.
#define PRIVATE_DEFINITION_END(Class)
 Macro to end definition of private section.
#define PRIVATE
 Macro to access private section by pointer.
#define PRIVATEWB
 Macro to access private section by pointer without braces ().
#define STATIC_INITIALIZER_BEGIN
 Macro to start static initializer.
#define STATIC_INITIALIZER_END
 Macro to end static initializer.
#define NO_COPY_CLASS(Class)
 Macro to remove class copy availability.
#define NO_UNUSED(x)
 Macro to supress compiler warning about unused variable.
#define PIP_REGISTER_TYPENAME(T)
 Macro to register a type name for use with PIP_TYPENAME when RTTI is disabled. Use at namespace scope, outside of class definitions.
#define PIP_DECLARE_TYPENAME(name)
 Macro to declare a type name for use with PIP_TYPENAME when RTTI is disabled. Use inside a class definition.
#define NO_COPY_CLASS(name)
 Macro to remove class copy availability.
#define _PIP_ADD_COUNTER_WS(a, cnt, line)
 Counter macro for unique identifier generation.
#define STATIC_INITIALIZER_BEGIN
 Macro to start static initializer.
#define STATIC_INITIALIZER_END
 Macro to end static initializer.
#define FOREVER   for (;;)
 Macro used for infinite loop.
#define FOREVER_WAIT   FOREVER piMinSleep();
 Macro used for infinite wait.
#define WAIT_FOREVER   FOREVER piMinSleep();
 Macro used for infinite wait.
#define PIP_MIN_MSLEEP   10.
 Minimal sleep in milliseconds for internal PIP using.

Detailed Description

Base macros

This file declares basic useful macros for the PIP library including platform detection, compiler-specific configurations, and utility macros for private data handling.

Macro Definition Documentation

◆ FOREVER

#define FOREVER   for (;;)

Macro used for infinite loop.

Expands to for(;;) infinite loop construct

◆ FOREVER_WAIT

#define FOREVER_WAIT   FOREVER piMinSleep();

Macro used for infinite wait.

Expands to infinite loop with periodic sleep calls for CPU-friendly waiting

◆ WAIT_FOREVER

#define WAIT_FOREVER   FOREVER piMinSleep();

Macro used for infinite wait.

Expands to infinite loop with periodic sleep calls for CPU-friendly waiting

See also
FOREVER_WAIT

◆ PIP_MIN_MSLEEP

#define PIP_MIN_MSLEEP   10.

Minimal sleep in milliseconds for internal PIP using.

Using in piMinSleep(), PIThread, PITimer::Pool. By default 1ms.

See also
PIP_MIN_MSLEEP