summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems/rtems/ratemon.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-04 10:20:29 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-04 10:20:29 +0200
commitee0e41355d1faa5f74085effc4f57c3a7fc1f884 (patch)
treec845395523e084218ca6715977648b807d30605d /cpukit/rtems/include/rtems/rtems/ratemon.h
parentscore: Fix _Thread_queue_Path_release() (diff)
downloadrtems-ee0e41355d1faa5f74085effc4f57c3a7fc1f884.tar.bz2
score: Fix a release/cancel job race condition
Split up the potential thread priority change in the scheduler release/cancel job operation. Protect the rate monotonic period state with a dedicated SMP lock. This avoids a race condition during _Rate_monotonic_Timeout() while _Rate_monotonic_Cancel() is called on another processor.
Diffstat (limited to '')
-rw-r--r--cpukit/rtems/include/rtems/rtems/ratemon.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h
index 3203eab394..a2df13f025 100644
--- a/cpukit/rtems/include/rtems/rtems/ratemon.h
+++ b/cpukit/rtems/include/rtems/rtems/ratemon.h
@@ -194,6 +194,11 @@ typedef struct {
/** This field is the object management portion of a Period instance. */
Objects_Control Object;
+ /**
+ * @brief Protects the rate monotonic period state.
+ */
+ ISR_LOCK_MEMBER( Lock )
+
/** This is the timer used to provide the unblocking mechanism. */
Watchdog_Control Timer;