mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-24 08:17:12 +08:00
config: Changeable size for IDLE stack allocator
Allow the IDLE stack allocator to change the stack size. This can be used by applications with a very dynamic thread-local storage size to adjust the thread storage area of the IDLE tasks dynamically. Update #4524.
This commit is contained in:
@@ -109,7 +109,7 @@ void *test_task_stack_allocate( size_t size );
|
||||
|
||||
void test_task_stack_deallocate( void *stack );
|
||||
|
||||
void *test_idle_task_stack_allocate( uint32_t cpu_index, size_t size );
|
||||
void *test_idle_task_stack_allocate( uint32_t cpu_index, size_t *size );
|
||||
|
||||
extern rtems_task_argument test_runner_argument;
|
||||
|
||||
|
||||
@@ -322,9 +322,9 @@ static char test_idle_stacks[ CONFIGURE_MAXIMUM_PROCESSORS ][
|
||||
RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT )
|
||||
RTEMS_SECTION( ".rtemsstack.idle" );
|
||||
|
||||
void *test_idle_task_stack_allocate( uint32_t cpu_index, size_t size )
|
||||
void *test_idle_task_stack_allocate( uint32_t cpu_index, size_t *size )
|
||||
{
|
||||
if ( size > sizeof( test_idle_stacks[ 0 ] ) ) {
|
||||
if ( *size > sizeof( test_idle_stacks[ 0 ] ) ) {
|
||||
rtems_fatal( RTEMS_FATAL_SOURCE_APPLICATION, 0xABAD1DEA );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user