diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-09-17 17:45:44 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-09-17 18:10:16 +0200 |
commit | 712748b8a28cb50192a63f9cae406e5adfa9d69e (patch) | |
tree | d342e37e3915115347e984a60b8e17b27e224707 /spec/rtems/task/req/ident.yml | |
parent | spec: Fix references (diff) | |
download | rtems-central-712748b8a28cb50192a63f9cae406e5adfa9d69e.tar.bz2 |
spec: Use rtems_task_construct()
Diffstat (limited to 'spec/rtems/task/req/ident.yml')
-rw-r--r-- | spec/rtems/task/req/ident.yml | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/spec/rtems/task/req/ident.yml b/spec/rtems/task/req/ident.yml index 2769cea7..e1276cc9 100644 --- a/spec/rtems/task/req/ident.yml +++ b/spec/rtems/task/req/ident.yml @@ -80,18 +80,12 @@ test-prepare: null test-setup: brief: null code: | - static char task_storage[ RTEMS_MINIMUM_STACK_SIZE ]; - static const rtems_task_config task_config = { - .name = ClassicObjectIdentName, - .initial_priority = 1, - .storage_area = task_storage, - .storage_size = sizeof( task_storage ), - .initial_modes = RTEMS_DEFAULT_MODES, - .attributes = RTEMS_DEFAULT_ATTRIBUTES - }; rtems_status_code sc; - sc = rtems_task_build( &task_config, &ctx->id_local_object ); + sc = rtems_task_construct( + &ClassicTaskIdentConfig, + &ctx->id_local_object + ); T_assert_rsc_success( sc ); description: null test-stop: null @@ -104,6 +98,28 @@ test-support: | { return rtems_task_ident( name, node, id ); } + + #define TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES + + #define MAX_TLS_SIZE RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT ) + + RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) + static char ClassicTaskIdentStorage[ + RTEMS_TASK_STORAGE_SIZE( + MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE, + TASK_ATTRIBUTES + ) + ]; + + static const rtems_task_config ClassicTaskIdentConfig = { + .name = ClassicObjectIdentName, + .initial_priority = 1, + .storage_area = ClassicTaskIdentStorage, + .storage_size = sizeof( ClassicTaskIdentStorage ), + .maximum_thread_local_storage_size = MAX_TLS_SIZE, + .initial_modes = RTEMS_DEFAULT_MODES, + .attributes = TASK_ATTRIBUTES + }; test-target: testsuites/validation/tc-task-ident.c test-teardown: null text: ${.:text-template} |