[PATCH v5 0/7] Add rtems_task_construct()

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Sep 16 14:49:03 UTC 2020


v2:

Rename function from rtems_task_build() to
rtems_task_create_from_config().  Add RTEMS_TASK_STORAGE_ALIGNMENT and
RTEMS_TASK_STORAGE_SIZE().  Improve documentation.

v3:

Add CONFIGURE_TASKS_CREATED_FROM_CONFIG.  Fix RTEMS_TASK_STORAGE_SIZE() if
CPU_ALL_TASKS_ARE_FP == TRUE.

v4:

Add CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE to control the maximum size
reserved for thread-local storage.

Add maximum_thread_local_storage_size member to rtems_task_config to check that
the thread-local storage size in the task configuration is sufficient for the
actual thread-local storage size of the application.

Add a general purpose test suite for basic validation tests.  Add a validation
test case to check the rtems_task_create_from_config() error cases.  The code
is generated from specification items:

https://git.rtems.org/rtems-central/tree/spec/testsuites/validation-0.yml

https://git.rtems.org/rtems-central/tree/spec/req/rtems/tasks/create-from-config-errors.yml

The build system part of the new tests is not included in the patch set.  I
don't want to add a new test suite for the old build system.

v5:

Rename rtems_task_create_from_config() in rtems_task_construct().

Rename CONFIGURE_TASKS_CREATED_FROM_CONFIG in
CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE.

Add RTEMS_ALIGN_DOWN() and RTEMS_ALIGN_UP().

Change RTEMS_TASK_STORAGE_ALIGNMENT to be an integer instead of a
variable attribute.

The item used to generate the test case is this:

https://git.rtems.org/rtems-central/tree/spec/rtems/task/req/construct-errors.yml

Update documentation according to review comments.

Sebastian Huber (7):
  rtems: Add RTEMS_ALIGN_DOWN()
  rtems: Add RTEMS_ALIGN_UP()
  CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE
  rtems: Add rtems_task_construct()
  doxygen: Move top-level group definitions
  validation: Add general purpose test suite
  validation: rtems_task_construct() errors

 Doxyfile                                      |    2 +-
 cpukit/doxygen.h                              |   18 -
 cpukit/doxygen/appl-config.h                  |   60 +
 cpukit/doxygen/top-level-groups.h             |   50 +
 cpukit/include/rtems/confdefs/threads.h       |   15 +
 cpukit/include/rtems/confdefs/wkspace.h       |    4 +-
 cpukit/include/rtems/rtems/tasks.h            |  193 ++
 cpukit/include/rtems/rtems/tasksimpl.h        |   11 +
 cpukit/include/rtems/score/basedefs.h         |   30 +
 cpukit/include/rtems/score/interr.h           |    3 +-
 cpukit/include/rtems/score/thread.h           |   10 +
 cpukit/rtems/src/taskconstruct.c              |  300 +++
 cpukit/rtems/src/taskcreate.c                 |  282 +-
 cpukit/sapi/src/interrtext.c                  |    5 +-
 cpukit/score/src/tlsallocsize.c               |   16 +-
 spec/build/cpukit/librtemscpu.yml             |    1 +
 spec/build/testsuites/grp.yml                 |    4 +
 spec/build/testsuites/optvalidation.yml       |   15 +
 spec/build/testsuites/sptests/grp.yml         |    2 +
 spec/build/testsuites/sptests/spfatal33.yml   |   19 +
 spec/build/testsuites/validation/grp.yml      |   18 +
 .../testsuites/validation/validation-0.yml    |   20 +
 testsuites/sptests/sp01/init.c                |   24 +-
 testsuites/sptests/sp01/sp01.doc              |    1 +
 testsuites/sptests/sp01/system.h              |    3 +-
 testsuites/sptests/spfatal33/init.c           |   55 +
 testsuites/sptests/spfatal33/spfatal33.doc    |   11 +
 testsuites/sptests/spfatal33/spfatal33.scn    |   16 +
 testsuites/sptests/spinternalerror02/init.c   |    4 +-
 .../validation/tc-task-construct-errors.c     | 2367 +++++++++++++++++
 testsuites/validation/ts-validation-0.c       |  222 ++
 31 files changed, 3518 insertions(+), 263 deletions(-)
 create mode 100644 cpukit/doxygen/top-level-groups.h
 create mode 100644 cpukit/rtems/src/taskconstruct.c
 create mode 100644 spec/build/testsuites/optvalidation.yml
 create mode 100644 spec/build/testsuites/sptests/spfatal33.yml
 create mode 100644 spec/build/testsuites/validation/grp.yml
 create mode 100644 spec/build/testsuites/validation/validation-0.yml
 create mode 100644 testsuites/sptests/spfatal33/init.c
 create mode 100644 testsuites/sptests/spfatal33/spfatal33.doc
 create mode 100644 testsuites/sptests/spfatal33/spfatal33.scn
 create mode 100644 testsuites/validation/tc-task-construct-errors.c
 create mode 100644 testsuites/validation/ts-validation-0.c

-- 
2.26.2



More information about the devel mailing list