r6:API:Abstraction (liblfds)

From liblfds.org
Jump to navigation Jump to search

Source Files



void abstraction_aligned_free( void *memory );
void *abstraction_aligned_malloc( size_t size, size_t align_in_bytes );
atom_t abstraction_cas( volatile atom_t *destination, atom_t exchange, atom_t compare )
unsigned char abstraction_dcas( volatile atom_t *destination, atom_t *exchange, atom_t *compare );
atom_t abstraction_increment( atom_t *value );

Defines & Typedefs

typedef [type] atom_t;

#define INLINE                [compiler inline directive]
#define ALIGN(alignment)      [compiler stack alignment directive]
#define ALIGN_SINGLE_POINTER  [atom_t size in bytes]
#define ALIGN_DOUBLE_POINTER  [atom_t size in bytes, multiplied by two]


This API is not a data structure. It is the abstraction layer for liblfds, which must be implemented on a given platform for liblfds to compile and run on that platform.

Please read the porting guide for detailed instructions.


Extern inline functions, for both GCC and MSVC, require the public prototype to be declared without the inline keyword while the function definition is declared with the inline keyword.