summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/mrsp.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-05-26 16:02:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-06-03 08:15:16 +0200
commit9553e7a60d42d46b6f1260121ece58217ad0384f (patch)
treedc7e8f6bbd9b0597fceaa91d735ce95bcab1000c /cpukit/score/include/rtems/score/mrsp.h
parentscore: Add resource node to thread control block (diff)
downloadrtems-9553e7a60d42d46b6f1260121ece58217ad0384f.tar.bz2
score: Use Resource Handler for MrsP semaphores
This enables proper resource dependency tracking and as a side-effect deadlock detection.
Diffstat (limited to 'cpukit/score/include/rtems/score/mrsp.h')
-rw-r--r--cpukit/score/include/rtems/score/mrsp.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/cpukit/score/include/rtems/score/mrsp.h b/cpukit/score/include/rtems/score/mrsp.h
index 407d5efecd..c31d5f6f19 100644
--- a/cpukit/score/include/rtems/score/mrsp.h
+++ b/cpukit/score/include/rtems/score/mrsp.h
@@ -63,6 +63,7 @@ typedef enum {
MRSP_INVALID_NUMBER = 10,
MRSP_RESOUCE_IN_USE = 12,
MRSP_UNSATISFIED = 13,
+ MRSP_INCORRECT_STATE = 14,
MRSP_INVALID_PRIORITY = 19,
MRSP_NOT_OWNER_OF_RESOURCE = 23,
MRSP_NO_MEMORY = 26
@@ -102,12 +103,9 @@ typedef struct {
*/
typedef struct {
/**
- * @brief The owner of the MRSP resource.
- *
- * In case this field is @c NULL, then this MRSP resource has currently no
- * owner.
+ * @brief Basic resource control.
*/
- Thread_Control *owner;
+ Resource_Control Resource;
/**
* @brief A chain of MrsP rivals waiting for resource ownership.
@@ -117,6 +115,12 @@ typedef struct {
Chain_Control Rivals;
/**
+ * @brief The initial priority of the owner before it was elevated to the
+ * ceiling priority.
+ */
+ Priority_Control initial_priority_of_owner;
+
+ /**
* @brief One ceiling priority per scheduler instance.
*/
Priority_Control *ceiling_priorities;