16 #ifndef _RTEMS_SCORE_FREECHAINIMPL_H 17 #define _RTEMS_SCORE_FREECHAINIMPL_H 36 typedef void *( *Freechain_Allocator )(
size_t size );
118 size_t number_nodes_to_extend,
138 size_t number_nodes_to_extend,
static __inline__ void _Chain_Initialize_node(Chain_Node *the_node)
Initializes a chain node.
static __inline__ void _Freechain_Initialize(Freechain_Control *freechain, void *initial_nodes, size_t number_nodes, size_t node_size)
Initializes a freechain.
static __inline__ Chain_Node * _Chain_Get_first_unprotected(Chain_Control *the_chain)
Gets the first node (unprotected).
void _Chain_Initialize(Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size)
Initializes a chain header.
void * _Freechain_Get(Freechain_Control *freechain, Freechain_Allocator allocator, size_t number_nodes_to_extend, size_t node_size)
Gets a node from the freechain.
static __inline__ void * _Freechain_Pop(Freechain_Control *freechain)
Pops a node from the freechain.
static __inline__ void _Chain_Prepend_unprotected(Chain_Control *the_chain, Chain_Node *the_node)
Prepends a node (unprotected).
Chain_Control Free
Chain of free nodes.
void _Freechain_Put(Freechain_Control *freechain, void *node)
Puts a node back onto the freechain.
void *(* Freechain_Allocator)(size_t size)
Allocator function.
static __inline__ bool _Freechain_Is_empty(const Freechain_Control *freechain)
Return true if the freechain is empty, otherwise false.
static void __inline__ _Freechain_Push(Freechain_Control *freechain, void *node)
Pushes a node back to the freechain.
This header file provides basic definitions used by the API and the implementation.
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
static __inline__ bool _Chain_Is_empty(const Chain_Control *the_chain)
Checks if the chain is empty.
void * _Freechain_Extend(Freechain_Control *freechain, Freechain_Allocator allocator, size_t number_nodes_to_extend, size_t node_size)
Extend the freechain with new nodes.