21 #ifndef _RTEMS_RBHEAP_H 22 #define _RTEMS_RBHEAP_H 205 static inline void rtems_rbheap_add_to_spare_descriptor_chain(
211 rtems_rbheap_get_spare_descriptor_chain(control);
217 static inline void rtems_rbheap_set_extend_descriptors(
225 static inline void *rtems_rbheap_get_handler_arg(
232 static inline void rtems_rbheap_set_handler_arg(
256 #define rtems_rbheap_chunk_of_node(node) \ 257 RTEMS_CONTAINER_OF(node, rtems_rbheap_chunk, tree_node) RTEMS_INLINE_ROUTINE void rtems_chain_initialize_node(rtems_chain_node *node)
Initializes a chain node.
Definition: chain.h:198
rtems_chain_control spare_descriptor_chain
Definition: rbheap.h:122
Constants and Structures Associated with the RBTree API in RTEMS.
uintptr_t begin
Definition: rbheap.h:75
rtems_rbtree_control chunk_tree
Definition: rbheap.h:127
Red-black heap control.
Definition: rbheap.h:110
Red-black tree node.
Definition: rbtree.h:50
Red-black heap chunk descriptor.
Definition: rbheap.h:54
void rtems_rbheap_extend_descriptors_never(rtems_rbheap_control *control)
Chunk descriptor extend handler that does nothing.
Definition: rbheap.c:270
rtems_chain_node chain_node
Definition: rbheap.h:63
RBTree_Control rtems_rbtree_control
Definition: rbtree.h:55
rtems_status_code rtems_rbheap_initialize(rtems_rbheap_control *control, void *area_begin, uintptr_t area_size, uintptr_t alignment, rtems_rbheap_extend_descriptors extend_descriptors, void *handler_arg)
Initializes the red-black tree heap control.
Definition: rbheap.c:91
rtems_rbtree_node tree_node
Definition: rbheap.h:69
RTEMS_INLINE_ROUTINE void rtems_chain_prepend_unprotected(rtems_chain_control *the_chain, rtems_chain_node *the_node)
Prepend a node (unprotected).
Definition: chain.h:714
uintptr_t size
Definition: rbheap.h:80
rtems_status_code
Classic API Status.
Definition: status.h:43
RTEMS_INLINE_ROUTINE bool rtems_chain_is_node_off_chain(const rtems_chain_node *node)
Is the node off chain.
Definition: chain.h:216
void(* rtems_rbheap_extend_descriptors)(rtems_rbheap_control *control)
Handler to extend the available chunk descriptors.
Definition: rbheap.h:105
void * rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
Allocates a chunk of memory of at least size bytes from the red-black tree heap control.
Definition: rbheap.c:165
Definition: intercom.c:74
rtems_rbheap_extend_descriptors extend_descriptors
Definition: rbheap.h:137
void * handler_arg
Definition: rbheap.h:142
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
Chunk descriptor extend handler that uses malloc().
Definition: rbheap.c:275
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
Frees a chunk of memory ptr allocated from the red-black tree heap control.
Definition: rbheap.c:243
unsigned size
Definition: tte.h:74
rtems_chain_control free_chunk_chain
Definition: rbheap.h:114
uintptr_t alignment
Definition: rbheap.h:132