diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-21 15:01:57 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-22 07:05:05 +0100 |
commit | 90960bd11a91259d9aace3870692dbe2e227de0f (patch) | |
tree | 3d88f8bc3d1fe17252e8290cadae2afb4a38ce4b /cpukit/rtems/include/rtems/rtems/ratemon.h | |
parent | rtems: Avoid __RTEMS_USE_TICKS_FOR_STATISTICS__ (diff) | |
download | rtems-90960bd11a91259d9aace3870692dbe2e227de0f.tar.bz2 |
rtems: Rework rate-monotonic scheduler
Use the default thread lock to protect rate-monotonic state changes.
This avoids use of the Giant lock. Split rtems_rate_monotonic_period()
body into several static functions. Introduce a new thread wait class
THREAD_WAIT_CLASS_PERIOD for period objects to synchronize the blocking
operation.
Close #2631.
Diffstat (limited to '')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/ratemon.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h index 0159e5c1e6..87bd064c98 100644 --- a/cpukit/rtems/include/rtems/rtems/ratemon.h +++ b/cpukit/rtems/include/rtems/rtems/ratemon.h @@ -84,24 +84,12 @@ typedef enum { /** * This value indicates the period is on the watchdog chain, and - * the owner is blocked waiting on it. - */ - RATE_MONOTONIC_OWNER_IS_BLOCKING, - - /** - * This value indicates the period is on the watchdog chain, and * running. The owner should be executed or blocked waiting on * another object. */ RATE_MONOTONIC_ACTIVE, /** - * This value indicates the period is on the watchdog chain, and - * has expired. The owner should be blocked waiting for the next period. - */ - RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING, - - /** * This value indicates the period is off the watchdog chain, and * has expired. The owner is still executing and has taken too much * all time to complete this iteration of the period. @@ -194,8 +182,12 @@ typedef struct { } rtems_rate_monotonic_period_status; /** - * The following structure defines the control block used to manage - * each period. + * @brief The following structure defines the control block used to manage each + * period. + * + * State changes are protected by the default thread lock of the owner thread. + * The owner thread is the thread that created the period object. The owner + * thread field is immutable after object creation. */ typedef struct { /** This field is the object management portion of a Period instance. */ |