define LFDS711_PAL_ALIGN

From liblfds.org
Revision as of 18:12, 16 February 2017 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source File

└───liblfds711
    └───inc
        └───liblfds711
                lfds711_porting_abstraction_layer_compiler.h

Macro

#define LFDS711_PAL_ALIGN( alignment )  [compiler alignment directive]

Parameters

alignment

Alignment in bytes.

Return Value

No return value.

Example

#define LFDS711_PAL_ALIGN(alignment)  __attribute__( (aligned(alignment)) )

Optionality

This define is mandatory and the library cannot compile if it is not set.

Notes

Atomic instructions require the variables they operate upon to meet certain memory alignment requirements.

This issue comes into play when making stack allocation, or positioning elements in structures for caching-line or exclusive reservation granule alignement and padding.

This macro is the mechanism by which the compiler specific keyword for alignment is provided to liblfds.

See Also