[PATCH 00/21] Support statically allocated threads

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Dec 16 14:28:05 UTC 2019


This change set makes it possible to statically allocate threads.  This means
the thread control block is provided by a statically allocated thread
information and the thread stack is provided by the user.  Currently, no API
function exists for this.  Adding this API is a follow up change set.  Only the
internal threads use statically allocated thread stacks in this change set.

Sebastian Huber (21):
  score: Remove superfluous FP types/defines
  score: Simplify thread stack allocation
  score: Simplify thread stack free
  score: Remove _Stack_Ensure_minimum() call
  score: Simplify FP context allocation
  score: Simplify TLS area allocation
  score: Split stack allocator configuration
  score: Add Thread_Configuration
  score: Add _Stack_Extend_size()
  score: Move thread stack allocation
  score: Statically allocate idle/MPCI stacks
  score: Add _Objects_Free_objects_block()
  score: Split up objects allocation
  score: Split up objects free
  score: Inline _Objects_Namespace_remove_u32()
  score: _Objects_Extend_information()
  score: Add _Freechain_Is_empty()
  score: Add _Freechain_Pop()
  score: Add _Freechain_Extend()
  score: Add _Objects_Activate_unlimited()
  score: Simplify _Thread_Initialize()

 cpukit/Makefile.am                                 |   9 +
 cpukit/include/rtems/confdefs.h                    | 149 ++++---------
 cpukit/include/rtems/config.h                      |  71 ++----
 cpukit/include/rtems/score/context.h               |   4 +-
 cpukit/include/rtems/score/freechain.h             |  42 ++++
 cpukit/include/rtems/score/mpci.h                  |   7 +
 cpukit/include/rtems/score/objectdata.h            |  99 ++++++++-
 cpukit/include/rtems/score/objectimpl.h            | 241 +++++++++++++--------
 cpukit/include/rtems/score/stack.h                 |  63 +++++-
 cpukit/include/rtems/score/stackimpl.h             |  67 +++++-
 cpukit/include/rtems/score/thread.h                |  34 ++-
 cpukit/include/rtems/score/threadimpl.h            | 108 +++++----
 cpukit/include/rtems/score/tls.h                   |  25 +--
 cpukit/posix/src/pthreadcreate.c                   |  79 ++++---
 cpukit/rtems/src/taskcreate.c                      |  57 ++---
 cpukit/score/cpu/arm/include/rtems/score/cpu.h     |   6 -
 cpukit/score/cpu/bfin/include/rtems/score/cpu.h    | 185 +---------------
 .../score/cpu/epiphany/include/rtems/score/cpu.h   | 106 +--------
 cpukit/score/cpu/lm32/include/rtems/score/cpu.h    |  92 +-------
 cpukit/score/cpu/moxie/include/rtems/score/cpu.h   | 138 +-----------
 cpukit/score/cpu/nios2/include/rtems/score/cpu.h   |   2 -
 cpukit/score/cpu/or1k/include/rtems/score/cpu.h    | 122 +----------
 cpukit/score/cpu/v850/include/rtems/score/cpu.h    | 144 +-----------
 cpukit/score/cpu/x86_64/include/rtems/score/cpu.h  |  31 +--
 cpukit/score/src/configstackspacesize.c            |  54 +++++
 cpukit/score/src/freechain.c                       |  33 ++-
 cpukit/score/src/mpci.c                            |  40 ++--
 cpukit/score/src/mpcidefault.c                     |   8 +
 cpukit/score/src/objectallocate.c                  | 101 +++------
 cpukit/score/src/objectallocatenone.c              |  45 ++++
 cpukit/score/src/objectallocatestatic.c            |  44 ++++
 cpukit/score/src/objectallocateunlimited.c         |  68 ++++++
 cpukit/score/src/objectextendinformation.c         |  21 +-
 cpukit/score/src/objectfree.c                      |   5 +-
 cpukit/score/src/objectfreenone.c                  |  47 ++++
 cpukit/score/src/objectfreestatic.c                |  47 ++++
 cpukit/score/src/objectnamespaceremove.c           |   9 -
 cpukit/score/src/objectshrinkinformation.c         |  92 ++++----
 cpukit/score/src/stackallocator.c                  |  41 ++++
 cpukit/score/src/threadallocateunlimited.c         |  92 ++++++++
 cpukit/score/src/threadcreateidle.c                |  46 ++--
 cpukit/score/src/threadinitialize.c                | 184 ++++++----------
 cpukit/score/src/threadrestart.c                   |   7 +-
 cpukit/score/src/threadstackallocate.c             |  28 +--
 cpukit/score/src/threadstackfree.c                 |  32 +--
 cpukit/score/src/tlsallocsize.c                    |  72 ++++++
 cpukit/score/src/wkspace.c                         |  38 ----
 testsuites/samples/unlimited/test1.c               |   2 +
 testsuites/sptests/spfreechain01/init.c            |   7 +-
 testsuites/sptests/spstkalloc/init.c               |   4 +-
 50 files changed, 1472 insertions(+), 1576 deletions(-)
 create mode 100644 cpukit/score/src/configstackspacesize.c
 create mode 100644 cpukit/score/src/objectallocatenone.c
 create mode 100644 cpukit/score/src/objectallocatestatic.c
 create mode 100644 cpukit/score/src/objectallocateunlimited.c
 create mode 100644 cpukit/score/src/objectfreenone.c
 create mode 100644 cpukit/score/src/objectfreestatic.c
 create mode 100644 cpukit/score/src/stackallocator.c
 create mode 100644 cpukit/score/src/threadallocateunlimited.c
 create mode 100644 cpukit/score/src/tlsallocsize.c

-- 
2.16.4



More information about the devel mailing list