summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-09-26 09:31:29 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-10-14 07:29:41 +0200
commit2846b17d7e34f1bdcac579ea1e0fbcb251aff1cb (patch)
tree417358a08e61a123e196a378a29bed07ae9806f8 /testsuites
parentscore: Require power of two CPU_STACK_MINIMUM_SIZE (diff)
downloadrtems-2846b17d7e34f1bdcac579ea1e0fbcb251aff1cb.tar.bz2
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.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/spstkalloc03/init.c4
-rw-r--r--testsuites/sptests/spstkalloc04/init.c4
-rw-r--r--testsuites/validation/ts-config.h2
-rw-r--r--testsuites/validation/ts-default.h4
4 files changed, 7 insertions, 7 deletions
diff --git a/testsuites/sptests/spstkalloc03/init.c b/testsuites/sptests/spstkalloc03/init.c
index 6d6817bccb..5ee7de26ec 100644
--- a/testsuites/sptests/spstkalloc03/init.c
+++ b/testsuites/sptests/spstkalloc03/init.c
@@ -87,12 +87,12 @@ static void thread_stacks_free(void *addr)
static void *thread_stacks_allocate_for_idle(
uint32_t cpu,
- size_t stack_size
+ size_t *stack_size
)
{
rtems_test_assert(thread_stacks_count == 0);
thread_stacks_count++;
- return allocate_helper(stack_size);
+ return allocate_helper(*stack_size);
}
/*
diff --git a/testsuites/sptests/spstkalloc04/init.c b/testsuites/sptests/spstkalloc04/init.c
index c5d2614f64..9678f6e00c 100644
--- a/testsuites/sptests/spstkalloc04/init.c
+++ b/testsuites/sptests/spstkalloc04/init.c
@@ -69,12 +69,12 @@ static void *allocate_helper(size_t size)
static void *thread_stacks_allocate_for_idle(
uint32_t cpu,
- size_t stack_size
+ size_t *stack_size
)
{
rtems_test_assert(thread_stacks_count == 0);
thread_stacks_count++;
- return allocate_helper(stack_size);
+ return allocate_helper(*stack_size);
}
/*
diff --git a/testsuites/validation/ts-config.h b/testsuites/validation/ts-config.h
index 7685fee278..fbd62ac6b5 100644
--- a/testsuites/validation/ts-config.h
+++ b/testsuites/validation/ts-config.h
@@ -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;
diff --git a/testsuites/validation/ts-default.h b/testsuites/validation/ts-default.h
index 435fccdc51..6e77496b90 100644
--- a/testsuites/validation/ts-default.h
+++ b/testsuites/validation/ts-default.h
@@ -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 );
}