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/testsuites | |
parent | spec: Fix references (diff) | |
download | rtems-central-712748b8a28cb50192a63f9cae406e5adfa9d69e.tar.bz2 |
spec: Use rtems_task_construct()
Diffstat (limited to 'spec/testsuites')
-rw-r--r-- | spec/testsuites/validation/profile.yml | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/spec/testsuites/validation/profile.yml b/spec/testsuites/validation/profile.yml index 8cc3d674..ca34f5bb 100644 --- a/spec/testsuites/validation/profile.yml +++ b/spec/testsuites/validation/profile.yml @@ -35,7 +35,16 @@ test-code: | rtems_fatal(RTEMS_FATAL_SOURCE_APPLICATION, 123); } - static char init_task_storage[RTEMS_MINIMUM_STACK_SIZE]; + #define INIT_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 init_task_storage[ + RTEMS_TASK_STORAGE_SIZE( + MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE, + INIT_TASK_ATTRIBUTES + ) + ]; static char buffer[512]; @@ -70,16 +79,18 @@ test-code: | .actions = actions }; + static const rtems_task_config task_config = { + .name = NAME, + .initial_priority = 1, + .storage_area = init_task_storage, + .storage_size = sizeof(init_task_storage), + .maximum_thread_local_storage_size = MAX_TLS_SIZE, + .initial_modes = RTEMS_DEFAULT_MODES, + .attributes = INIT_TASK_ATTRIBUTES + }; + static void init_task(void) { - static const rtems_task_config task_config = { - .name = NAME, - .initial_priority = 1, - .storage_area = init_task_storage, - .storage_size = sizeof(init_task_storage), - .initial_modes = RTEMS_DEFAULT_MODES, - .attributes = RTEMS_DEFAULT_ATTRIBUTES - }; rtems_id id; rtems_status_code sc; @@ -87,7 +98,7 @@ test-code: | T_case_begin("SpaceProfileTaskBuild", NULL); T_plan(2); - sc = rtems_task_build(&task_config, &id); + sc = rtems_task_construct(&task_config, &id); T_step_rsc_success(0, sc); sc = rtems_task_start(id, Init, 0); |