38#ifndef _RTEMS_SCORE_STACKIMPL_H
39#define _RTEMS_SCORE_STACKIMPL_H
66static inline void _Stack_Initialize (
68 void *starting_address,
72 the_stack->
area = starting_address;
73 the_stack->
size = size;
84static inline uint32_t _Stack_Minimum (
void)
101static inline bool _Stack_Is_enough(
109 minimum += _Stack_Minimum();
111#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
117 return ( size >= minimum );
131static inline size_t _Stack_Ensure_minimum (
135 if ( size >= _Stack_Minimum() )
137 return _Stack_Minimum();
151static inline size_t _Stack_Extend_size(
157 size_t allocator_overhead;
161#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
175 extra_size += CPU_STACK_ALIGNMENT - 1;
182 allocator_overhead = CPU_STACK_ALIGNMENT - CPU_HEAP_ALIGNMENT;
184 if ( stack_size > SIZE_MAX - extra_size - allocator_overhead ) {
191 stack_size += extra_size;
194 return stack_size + allocator_overhead;
This header file provides the interfaces of the Context Handler.
This header file provides interfaces of the Stack Handler which are used by the implementation and th...
#define RTEMS_ALIGN_DOWN(_value, _alignment)
Aligns down the value to the alignment.
Definition: basedefs.h:123
#define CONTEXT_FP_SIZE
Size of floating point context area.
Definition: context.h:70
void _Stack_Free(void *stack_area)
Free the stack area allocated by _Stack_Allocate().
Definition: threadstackfree.c:45
void * _Stack_Allocate(size_t stack_size)
Allocate the requested stack space.
Definition: threadstackallocate.c:45
uint32_t rtems_minimum_stack_size
The minimum stack size.
uintptr_t _TLS_Get_allocation_size(void)
Gets the allocation size of the thread-local storage area in bytes.
Definition: tlsallocsize.c:78
size_t size
Definition: stack.h:73
void * area
Definition: stack.h:75
This header file provides the interfaces of the Thread-Local Storage (TLS).