Toolchain

This module defines a toolchain abstraction layer through macros.

Summary

Usage:

typedef
OT_TOOL_PACKED_BEGIN
struct
{
    char mField1;
    union
    {
        char mField2;
        long mField3;
    } OT_TOOL_PACKED_FIELD;
} OT_TOOL_PACKED_END packed_struct_t;

Macros

OTAPI

 OTAPI

Compiler-specific modifier for public API declarations.

OTCALL

 OTCALL

Compiler-specific modifier to export functions in a DLL.

OT_CALL

 OT_CALL

Compiler-specific function modifier, ie: Win DLL support.

OT_CDECL

 OT_CDECL

Compiler-specific function modifier, ie: Win DLL support.

OT_TOOL_ALIGN

 OT_TOOL_ALIGN

Compiler-specific alignment modifier.

OT_TOOL_PACKED_BEGIN

 OT_TOOL_PACKED_BEGIN

Compiler-specific indication that a class or struct must be byte packed.

OT_TOOL_PACKED_END

 OT_TOOL_PACKED_END

Compiler-specific indication at the end of a byte packed class or struct.

OT_TOOL_PACKED_FIELD

 OT_TOOL_PACKED_FIELD

Indicate to the compiler a nested struct or union to be packed within byte packed class or struct.

OT_TOOL_WEAK

 OT_TOOL_WEAK

Compiler-specific weak symbol modifier.

OT_UNREACHABLE_CODE

 OT_UNREACHABLE_CODE CODE

Suppress Unreachable code warning in specific toolchains.

OT_UNUSED_VARIABLE

 OT_UNUSED_VARIABLE do                               \
    {                                \
        (void)(VARIABLE);            \
    } while (false)

Suppress unused variable warning in specific toolchains.