[PATCH 0/6] Fix rtems_task_restart() in combination with priority inheritance, etc.

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Nov 15 17:08:54 UTC 2021


Consider the following scenario. Let a high priority task H wait on a priority
inheritance mutex M owned by a low priority task L. Restart task H. This should
remove the priority inherited by H from L. This is currently not the case and
the patch set fixes this.

A test for this is in the new validation test suite which will be sent for
review later.

Sebastian Huber (6):
  score: Remove thread timer earlier
  score: Add _Thread_MP_Extract_proxy()
  score: Simplify thread wait state handling
  score: Move _Thread_queue_Extract()
  score: _Thread_queue_Surrender_no_priority()
  score: Properly continue the thread during restart

 cpukit/include/rtems/rtems/ratemonimpl.h   |  3 --
 cpukit/include/rtems/score/objectdata.h    |  2 +-
 cpukit/include/rtems/score/status.h        |  2 +
 cpukit/include/rtems/score/thread.h        |  2 +-
 cpukit/include/rtems/score/threadimpl.h    | 19 +++----
 cpukit/include/rtems/score/threadmp.h      | 13 +++++
 cpukit/include/rtems/score/threadqimpl.h   | 25 +++------
 cpukit/posix/src/psignalunblockthread.c    | 16 ++++--
 cpukit/rtems/src/eventsurrender.c          | 12 ++---
 cpukit/rtems/src/ratemonperiod.c           |  2 +-
 cpukit/rtems/src/ratemontimeout.c          |  4 +-
 cpukit/score/src/threadinitialize.c        |  2 +-
 cpukit/score/src/threadqenqueue.c          | 62 +++-------------------
 cpukit/score/src/threadqextract.c          | 57 ++++++++++++++++++++
 cpukit/score/src/threadqextractwithproxy.c | 46 ++++++++--------
 cpukit/score/src/threadrestart.c           | 17 ++++--
 cpukit/score/src/threadtimeout.c           |  8 ++-
 spec/build/cpukit/librtemscpu.yml          |  2 +-
 spec/build/cpukit/objmpci.yml              |  1 +
 testsuites/sptests/spintrcritical08/init.c | 13 +----
 testsuites/sptests/spintrcritical09/init.c |  2 +-
 testsuites/sptests/spintrcritical10/init.c |  9 ++--
 testsuites/sptests/spintrcritical22/init.c |  2 +-
 23 files changed, 159 insertions(+), 162 deletions(-)
 create mode 100644 cpukit/score/src/threadqextract.c

-- 
2.26.2



More information about the devel mailing list