37#ifndef _RTEMS_SCORE_FREECHAINIMPL_H
38#define _RTEMS_SCORE_FREECHAINIMPL_H
57typedef void *( *Freechain_Allocator )(
size_t size );
71static inline void _Freechain_Initialize(
91static inline bool _Freechain_Is_empty(
95 return _Chain_Is_empty( &freechain->
Free );
107 return _Chain_Get_first_unprotected( &freechain->
Free );
116void static inline _Freechain_Push(
121 _Chain_Initialize_node( node );
122 _Chain_Prepend_unprotected( &freechain->
Free, node );
139 size_t number_nodes_to_extend,
159 size_t number_nodes_to_extend,
This header file provides basic definitions used by the API and the implementation.
This header file provides interfaces of the Chain Handler which are only used by the implementation.
This header file provides interfaces of the Freechain Handler which are used by the implementation an...
void _Chain_Initialize(Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size)
Initializes a chain header.
Definition: chain.c:46
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.
Definition: freechain.c:66
void _Freechain_Put(Freechain_Control *freechain, void *node)
Puts a node back onto the freechain.
Definition: freechain.c:87
void *(* Freechain_Allocator)(size_t size)
Allocator function.
Definition: freechainimpl.h:57
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.
Definition: freechain.c:44
The freechain control.
Definition: freechain.h:64
Chain_Control Free
Chain of free nodes.
Definition: freechain.h:68
unsigned size
Definition: tte.h:1