summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxkey08/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/psxtests/psxkey08/init.c')
-rw-r--r--testsuites/psxtests/psxkey08/init.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/testsuites/psxtests/psxkey08/init.c b/testsuites/psxtests/psxkey08/init.c
index fe2e47b343..5dee218377 100644
--- a/testsuites/psxtests/psxkey08/init.c
+++ b/testsuites/psxtests/psxkey08/init.c
@@ -55,9 +55,10 @@ rtems_task test_task(rtems_task_argument arg)
rtems_task Init(rtems_task_argument arg)
{
- rtems_status_code status;
- int sc;
- rtems_id *task_id_p;
+ rtems_status_code status;
+ int sc;
+ uintptr_t max_free_size = 13 * RTEMS_MINIMUM_STACK_SIZE;
+ void *greedy;
all_thread_created = 0;
@@ -88,6 +89,9 @@ rtems_task Init(rtems_task_argument arg)
sc = pthread_key_create( &Key, NULL );
rtems_test_assert( !sc );
+ /* Reduce workspace size if necessary to shorten test time */
+ greedy = rtems_workspace_greedy_allocate( &max_free_size, 1 );
+
for ( ; ; ) {
rtems_id task_id;
@@ -121,6 +125,8 @@ rtems_task Init(rtems_task_argument arg)
rtems_test_assert( sc == RTEMS_SUCCESSFUL );
}
+ rtems_workspace_greedy_free( greedy );
+
printf(
"Init - %d tasks have been created - OK\n"
"Init - %d tasks have been setted key data - OK\n",