Changeset 724df1c in rtems-central


Ignore:
Timestamp:
Aug 21, 2020, 2:04:36 PM (14 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
3bdf817
Parents:
51f9a65
git-author:
Sebastian Huber <sebastian.huber@…> (08/21/20 14:04:36)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/16/20 09:39:08)
Message:

spec: Specify rtems_task_construct()

Previous directive name was rtems_task_create_from_config().

Location:
spec
Files:
2 added
7 edited
4 moved

Legend:

Unmodified
Added
Removed
  • spec/if/acfg/max-thread-local-storage-size.yml

    r51f9a65 r724df1c  
    2727  than a non-zero value of this configuration option, then a fatal error will
    2828  occur during system initialization.
     29
     30  Use ${../rtems/basedefs/align-up:/name} and
     31  ${../rtems/tasks/storage-alignment:/name} to adjust the size to meet the
     32  minimum alignment requirement of a thread-local storage area.
    2933text: ''
    3034type: interface
  • spec/if/acfg/min-tasks-with-user-provided-storage.yml

    r51f9a65 r724df1c  
    88default-value: 0
    99description: |
    10   The value of this configuration option defines the count of Classic API Tasks
    11   which are created by ${../rtems/tasks/create-from-config:/name}.
     10  The value of this configuration option defines the minimum count of Classic
     11  API Tasks which are constructed by ${../rtems/tasks/construct:/name}.
    1212enabled-by: true
    1313index-entries: []
     
    1616- role: appl-config-group-member
    1717  uid: group-classic
    18 name: CONFIGURE_TASKS_CREATED_FROM_CONFIG
     18name: CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE
    1919notes: |
    20   By default, the calculation for the required memory in the RTEMS Workspace for
    21   tasks assumes that all Classic API Tasks are created by
     20  By default, the calculation for the required memory in the RTEMS Workspace
     21  for tasks assumes that all Classic API Tasks are created by
    2222  ${../rtems/tasks/create:/name}.  This configuration option can be used to
    23   reduce the required memory for the system-provided task storage
    24   areas since tasks created by ${../rtems/tasks/create-from-config:/name} use a
    25   user-provided task storage area.
     23  reduce the required memory for the system-provided task storage areas since
     24  tasks constructed by ${../rtems/tasks/construct:/name} use a user-provided
     25  task storage area.
    2626text: ''
    2727type: interface
  • spec/if/impl/cpu/heap-alignment.yml

    r51f9a65 r724df1c  
    77- role: interface-placement
    88  uid: header
    9 name: CPU_STACK_ALIGNMENT
     9name: CPU_HEAP_ALIGNMENT
    1010reference: null
    1111type: interface
  • spec/if/rtems/tasks/config.yml

    r51f9a65 r724df1c  
    11SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
    22brief: |
    3   This structure defines a task configuration used to build a task.  This
    4   structure defines the configuration of a task created by
    5   ${create-from-config:/name}.
     3  This structure defines the configuration of a task constructed by
     4  ${construct:/name}.
    65copyrights:
    76- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
     
    3231      floating-point context.
    3332
    34       There are no alignment requirements for the task storage area.  To avoid
    35       memory waste, use the ${storage-alignment:/name} variable attribute to
    36       enforce the recommended alignment of the task storage area.
     33      The task storage area begin address and size should be aligned by
     34      ${storage-alignment:/name}.  To avoid memory waste, use
     35      ${../basedefs/aligned:/name} and ${storage-alignment:/name} to enforce
     36      the recommended alignment of a statically allocated task storage area.
    3737    kind: member
    3838    name: storage_area
     
    5454    definition: ${../../c/size_t:/name} ${.:name}
    5555    description: |
     56      Use ${../basedefs/align-up:/name} and ${storage-alignment:/name} to
     57      adjust the size to meet the minimum alignment requirement of a
     58      thread-local storage area used to construct a task.
     59
    5660      If the value is less than the actual thread-local storage size, then the
    57       task creation by ${create-from-config:/name} fails.
     61      task construction by ${construct:/name} fails.
    5862
    59       If the is less than the task storage area size, then the task creation by
    60       ${create-from-config:/name} fails.
     63      If the is less than the task storage area size, then the task
     64      construction by ${construct:/name} fails.
    6165    kind: member
    6266    name: maximum_thread_local_storage_size
     
    6771    definition: void ( *${.:name} )( void * )
    6872    description: |
    69       It is called when the task creation aborts due to a failed task create
    70       extension or the task is deleted.  It is called from task context under
     73      It is called on exactly two mutually exclusive occasions.  Firstly, when
     74      the task construction aborts due to a failed task create extension, or
     75      secondly, when the task is deleted.  It is called from task context under
    7176      protection of the object allocator lock.  It is allowed to call free() in
    72       this handler.  The handler may be ${../../c/null:/name}.
     77      this handler.  If handler is ${../../c/null:/name}, then no action will
     78      be performed.
    7379    kind: member
    7480    name: storage_free
  • spec/if/rtems/tasks/construct.yml

    r51f9a65 r724df1c  
    2020- role: interface-ingroup
    2121  uid: group
    22 name: rtems_task_create_from_config
     22name: rtems_task_construct
    2323notes: |
    24   In contrast to tasks created by ${create:/name}, the tasks created by this
    25   directive use a user-provided task storage area.  The task storage area
     24  In contrast to tasks created by ${create:/name}, the tasks constructed by
     25  this directive use a user-provided task storage area.  The task storage area
    2626  contains the task stack, the thread-local storage, and the floating-point
    2727  context on architectures with a separate floating-point context.
     
    3333  assumes that all tasks are created by ${create:/name}.  The estimate can be
    3434  adjusted to take user-provided task storage areas into account through the
    35   ${../../acfg/tasks-created-from-config:/name} application configuration
    36   option or a custom task stack allocator, see
    37   ${../../acfg/task-stack-allocator:/name}.
     35  ${../../acfg/min-tasks-with-user-provided-storage:/name} application
     36  configuration option.
    3837params:
    3938- description: is the task configuration.
     
    4241- description: |
    4342    is the pointer to an object identifier variable.  The identifier of the
    44     created task object will be stored in this variable, in case of a
     43    constructed task object will be stored in this variable, in case of a
    4544    successful operation.
    4645  dir: out
     
    7574    value: ${../status/invalid-size:/name}
    7675  - description: |
    77       There was no inactive task object available to create a task.
     76      There was no inactive task object available to construct a task.
    7877    value: ${../status/too-many:/name}
    7978  - description: |
    8079      In multiprocessing configurations, there was no inactive global object
    81       available to create a global task.
     80      available to construct a global task.
    8281    value: ${../status/too-many:/name}
    8382  - description: |
    84       One of the task create extensions failed during the task creation.
     83      One of the task create extensions failed during the task construction.
    8584    value: ${../status/unsatisfied:/name}
    8685  - description: |
  • spec/if/rtems/tasks/storage-alignment.yml

    r51f9a65 r724df1c  
    11SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
    22brief: |
    3   This variable attribute defines the recommended alignment of a task storage
    4   area.
     3  This constant defines the recommended alignment of a task storage area in
     4  bytes.
    55copyrights:
    66- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
    77definition:
    8   default: |
    9     ${../basedefs/aligned:/name}( ${../../impl/cpu/stack-alignment:/name} )
     8  default: ${../../impl/cpu/heap-alignment:/name}
    109  variants: []
    1110description: null
     
    1817  uid: group
    1918name: RTEMS_TASK_STORAGE_ALIGNMENT
    20 notes: null
     19notes: |
     20  Use it with ${../basedefs/aligned:/name} to define the alignment of a
     21  statically allocated task storage area.
    2122type: interface
  • spec/req/rtems/event/send-receive.yml

    r51f9a65 r724df1c  
    462462  brief: null
    463463  code: |
    464     static char  task_stack[ RTEMS_MINIMUM_STACK_SIZE ];
     464    static char  task_storage[ RTEMS_MINIMUM_STACK_SIZE ];
    465465    static const rtems_task_config task_config = {
    466466      .name = rtems_build_name( 'W', 'O', 'R', 'K' ),
    467467      .initial_priority = PRIO_LOW,
    468       .stack_area = task_stack,
    469       .stack_size = sizeof( task_stack ),
     468      .storage_area = task_storage,
     469      .storage_size = sizeof( task_storage ),
    470470      .initial_modes = RTEMS_DEFAULT_MODES,
    471       .attribute_set = RTEMS_DEFAULT_ATTRIBUTES
     471      .attributes = RTEMS_DEFAULT_ATTRIBUTES
    472472    };
    473473
  • spec/req/rtems/tasks/construct-errors.yml

    r51f9a65 r724df1c  
    66links:
    77- role: interface-function
    8   uid: /if/rtems/tasks/create-from-config
     8  uid: /if/rtems/tasks/construct
    99post-conditions:
    1010- name: Status
     
    2020    text: |
    2121      The status shall be RTEMS_SUCCESSFUL.  The value of the object identifier
    22       referenced by the id parameter shall identify the created task.
     22      referenced by the id parameter shall identify the constructed task.
    2323  - name: InvAddress
    2424    test-code: |
     
    135135        rtems_id id;
    136136
    137         sc = rtems_task_create_from_config( &valid_task_config, &id );
     137        sc = rtems_task_construct( &valid_task_config, &id );
    138138
    139139        if ( sc == RTEMS_SUCCESSFUL ) {
     
    231231    ctx->config.attributes
    232232  );
    233   ctx->status = rtems_task_create_from_config( &ctx->config, ctx->id );
     233  ctx->status = rtems_task_construct( &ctx->config, ctx->id );
    234234test-brief: null
    235235test-cleanup: |
     
    304304  static _Thread_local int tls_variable;
    305305
    306   #define MAX_TLS_SIZE 128
    307 
    308   RTEMS_TASK_STORAGE_ALIGNMENT static char task_storage[
     306  #define MAX_TLS_SIZE RTEMS_ALIGN_UP( 128, RTEMS_TASK_STORAGE_ALIGNMENT )
     307
     308  RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) static char task_storage[
    309309    RTEMS_TASK_STORAGE_SIZE(
    310310      MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE,
     
    328328    (void) created;
    329329
    330     return
    331       ReqRtemsTasksCreateFromConfigErrors_Instance.create_extension_status;
     330    return ReqRtemsTasksConstructErrors_Instance.create_extension_status;
    332331  }
    333332
     
    335334    .thread_create = ThreadCreate
    336335  };
    337 test-target: testsuites/validation/tc-tasks-create-from-config-errors.c
     336test-target: testsuites/validation/tc-task-construct-errors.c
    338337test-teardown:
    339338  brief: null
  • spec/req/rtems/tasks/ident.yml

    r51f9a65 r724df1c  
    8585      .name = ClassicObjectIdentName,
    8686      .initial_priority = 1,
    87       .stack_area = task_storage,
    88       .stack_size = sizeof( task_storage ),
     87      .storage_area = task_storage,
     88      .storage_size = sizeof( task_storage ),
    8989      .initial_modes = RTEMS_DEFAULT_MODES,
    90       .attribute_set = RTEMS_DEFAULT_ATTRIBUTES
     90      .attributes = RTEMS_DEFAULT_ATTRIBUTES
    9191    };
    9292    rtems_status_code sc;
  • spec/testsuites/validation-0.yml

    r51f9a65 r724df1c  
    5555  }
    5656
    57   #define MAX_TLS_SIZE 64
     57  #define MAX_TLS_SIZE RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT )
     58
    5859  #define ATTRIBUTES RTEMS_FLOATING_POINT
    5960
    60   RTEMS_TASK_STORAGE_ALIGNMENT static char runner_task_storage[
     61  RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT )
     62  static char runner_task_storage[
    6163    RTEMS_TASK_STORAGE_SIZE(
    6264      MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE,
     
    8082    rtems_status_code sc;
    8183
    82     sc = rtems_task_create_from_config( &runner_task_config, &id );
     84    sc = rtems_task_construct( &runner_task_config, &id );
    8385    if ( sc != RTEMS_SUCCESSFUL ) {
    8486      rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, 1 );
     
    112114
    113115  #define CONFIGURE_MAXIMUM_TASKS 3
     116
     117  #define CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE \
     118    CONFIGURE_MAXIMUM_TASKS
    114119
    115120  #define CONFIGURE_MAXIMUM_TIMERS 3
  • spec/testsuites/validation/profile.yml

    r51f9a65 r724df1c  
    3636  }
    3737
    38   static char init_task_stack[RTEMS_MINIMUM_STACK_SIZE];
     38  static char init_task_storage[RTEMS_MINIMUM_STACK_SIZE];
    3939
    4040  static char buffer[512];
     
    7676      .name = NAME,
    7777      .initial_priority = 1,
    78       .stack_area = init_task_stack,
    79       .stack_size = sizeof(init_task_stack),
     78      .storage_area = init_task_storage,
     79      .storage_size = sizeof(init_task_storage),
    8080      .initial_modes = RTEMS_DEFAULT_MODES,
    81       .attribute_set = RTEMS_DEFAULT_ATTRIBUTES
     81      .attributes = RTEMS_DEFAULT_ATTRIBUTES
    8282    };
    8383    rtems_id id;
Note: See TracChangeset for help on using the changeset viewer.