RTEMS
|
Multiprocessor Resource Sharing Protocol (MrsP). More...
Files | |
file | mrsp.h |
Definitions for Multiprocessor Resource Sharing Protocol (MrsP). | |
file | mrspimpl.h |
Definitions for Multiprocessor Resource Sharing Protocol (MrsP) Implementation. | |
Classes | |
struct | MRSP_Control |
MrsP control block. More... | |
Macros | |
#define | MRSP_TQ_OPERATIONS &_Thread_queue_Operations_priority_inherit |
Functions | |
static __inline__ void | _MRSP_Acquire_critical (MRSP_Control *mrsp, Thread_queue_Context *queue_context) |
Acquires critical accordingt to MrsP. More... | |
static __inline__ void | _MRSP_Release (MRSP_Control *mrsp, Thread_queue_Context *queue_context) |
Releases according to MrsP. More... | |
static __inline__ Thread_Control * | _MRSP_Get_owner (const MRSP_Control *mrsp) |
Gets owner of the MrsP control. More... | |
static __inline__ void | _MRSP_Set_owner (MRSP_Control *mrsp, Thread_Control *owner) |
Sets owner of the MrsP control. More... | |
static __inline__ Priority_Control | _MRSP_Get_priority (const MRSP_Control *mrsp, const Scheduler_Control *scheduler) |
Gets priority of the MrsP control. More... | |
static __inline__ void | _MRSP_Set_priority (MRSP_Control *mrsp, const Scheduler_Control *scheduler, Priority_Control new_priority) |
Sets priority of the MrsP control. More... | |
static __inline__ Status_Control | _MRSP_Raise_priority (MRSP_Control *mrsp, Thread_Control *thread, Priority_Node *priority_node, Thread_queue_Context *queue_context) |
Adds the priority to the given thread. More... | |
static __inline__ void | _MRSP_Remove_priority (Thread_Control *thread, Priority_Node *priority_node, Thread_queue_Context *queue_context) |
Removes the priority from the given thread. More... | |
static __inline__ void | _MRSP_Replace_priority (MRSP_Control *mrsp, Thread_Control *thread, Priority_Node *ceiling_priority) |
Replaces the given priority node with the ceiling priority of the MrsP control. More... | |
static __inline__ Status_Control | _MRSP_Claim_ownership (MRSP_Control *mrsp, Thread_Control *executing, Thread_queue_Context *queue_context) |
Claims ownership of the MrsP control. More... | |
static __inline__ Status_Control | _MRSP_Initialize (MRSP_Control *mrsp, const Scheduler_Control *scheduler, Priority_Control ceiling_priority, Thread_Control *executing, bool initially_locked) |
Initializes a MrsP control. More... | |
static __inline__ Status_Control | _MRSP_Wait_for_ownership (MRSP_Control *mrsp, Thread_Control *executing, Thread_queue_Context *queue_context) |
Waits for the ownership of the MrsP control. More... | |
static __inline__ Status_Control | _MRSP_Seize (MRSP_Control *mrsp, Thread_Control *executing, bool wait, Thread_queue_Context *queue_context) |
Seizes the MrsP control. More... | |
static __inline__ Status_Control | _MRSP_Surrender (MRSP_Control *mrsp, Thread_Control *executing, Thread_queue_Context *queue_context) |
Surrenders the MrsP control. More... | |
static __inline__ Status_Control | _MRSP_Can_destroy (MRSP_Control *mrsp) |
Checks if the MrsP control can be destroyed. More... | |
static __inline__ void | _MRSP_Destroy (MRSP_Control *mrsp, Thread_queue_Context *queue_context) |
Destroys the MrsP control. More... | |
Multiprocessor Resource Sharing Protocol (MrsP).
The Multiprocessor Resource Sharing Protocol (MrsP) is defined in A. Burns and A.J. Wellings, A Schedulability Compatible Multiprocessor Resource Sharing Protocol - MrsP, Proceedings of the 25th Euromicro Conference on Real-Time Systems (ECRTS 2013), July 2013. It is a generalization of the Priority Ceiling Protocol to SMP systems. Each MrsP semaphore uses a ceiling priority per scheduler instance. A task obtaining or owning a MrsP semaphore will execute with the ceiling priority for its scheduler instance as specified by the MrsP semaphore object. Tasks waiting to get ownership of a MrsP semaphore will not relinquish the processor voluntarily. In case the owner of a MrsP semaphore gets preempted it can ask all tasks waiting for this semaphore to help out and temporarily borrow the right to execute on one of their assigned processors.
|
static |
Acquires critical accordingt to MrsP.
mrsp | The MrsP control for the operation. |
queue_context | The thread queue context. |
Definition at line 53 of file mrspimpl.h.
|
static |
Checks if the MrsP control can be destroyed.
mrsp | The MrsP control for the operation. |
STATUS_SUCCESSFUL | The MrsP is currently not used and can be destroyed. |
STATUS_RESOURCE_IN_USE | The MrsP control is in use, it cannot be destroyed. |
Definition at line 497 of file mrspimpl.h.
|
static |
Claims ownership of the MrsP control.
mrsp | The MrsP control to claim the ownership of. | |
[in,out] | executing | The currently executing thread. |
queue_context | The thread queue context. |
STATUS_SUCCESSFUL | The operation succeeded. |
STATUS_MUTEX_CEILING_VIOLATED | The wait priority of the executing thread exceeds the ceiling priority. |
Definition at line 246 of file mrspimpl.h.
|
static |
Destroys the MrsP control.
[in,out] | The | mrsp that is about to be destroyed. |
queue_context | The thread queue context. |
Definition at line 512 of file mrspimpl.h.
|
static |
Gets owner of the MrsP control.
mrsp | The MrsP control to get the owner from. |
Definition at line 82 of file mrspimpl.h.
|
static |
Gets priority of the MrsP control.
mrsp | The mrsp to get the priority from. |
scheduler | The corresponding scheduler. |
Definition at line 111 of file mrspimpl.h.
|
static |
Initializes a MrsP control.
[out] | mrsp | The MrsP control that is initialized. |
scheduler | The scheduler for the operation. | |
ceiling_priority | ||
executing | The currently executing thread. Ignored in this method. | |
initially_locked | Indicates whether the MrsP control shall be initally locked. If it is initially locked, this method returns STATUS_INVALID_NUMBER. |
STATUS_SUCCESSFUL | The operation succeeded. |
STATUS_INVALID_NUMBER | The MrsP control is initially locked. |
STATUS_NO_MEMORY | There is not enough memory to allocate. |
Definition at line 289 of file mrspimpl.h.
|
static |
Adds the priority to the given thread.
mrsp | The MrsP control for the operation. | |
[in,out] | thread | The thread to add the priority node to. |
[out] | priority_node | The priority node to initialize and add to the thread. |
queue_context | The thread queue context. |
STATUS_SUCCESSFUL | The operation succeeded. |
STATUS_MUTEX_CEILING_VIOLATED | The wait priority of the thread exceeds the ceiling priority. |
Definition at line 154 of file mrspimpl.h.
|
static |
Releases according to MrsP.
mrsp | The MrsP control for the operation. |
queue_context | The thread queue context. |
Definition at line 67 of file mrspimpl.h.
|
static |
Removes the priority from the given thread.
[in,out] | The | thread to remove the priority from. |
priority_node | The priority node to remove from the thread | |
queue_context | The thread queue context. |
Definition at line 196 of file mrspimpl.h.
|
static |
Replaces the given priority node with the ceiling priority of the MrsP control.
mrsp | The mrsp control for the operation. | |
[out] | thread | The thread to replace the priorities. |
ceiling_priority | The node to be replaced. |
Definition at line 218 of file mrspimpl.h.
|
static |
Seizes the MrsP control.
[in,out] | mrsp | The MrsP control to seize the control of. |
[in,out] | executing | The currently executing thread. |
wait | Indicates whether the calling thread is willing to wait. | |
queue_context | The thread queue context. |
STATUS_SUCCESSFUL | The operation succeeded. |
STATUS_MUTEX_CEILING_VIOLATED | The wait priority of the executing thread exceeds the ceiling priority. |
STATUS_UNAVAILABLE | The executing thread is already the owner of the MrsP control. Seizing it is not possible. |
Definition at line 406 of file mrspimpl.h.
|
static |
Sets owner of the MrsP control.
[out] | mrsp | The MrsP control to set the owner of. |
owner | The desired new owner for mrsp. |
Definition at line 95 of file mrspimpl.h.
|
static |
Sets priority of the MrsP control.
[out] | mrsp | The MrsP control to set the priority of. |
schedulger | The corresponding scheduler. | |
new_priority | The new priority for the MrsP control |
Definition at line 129 of file mrspimpl.h.
|
static |
Surrenders the MrsP control.
[in,out] | mrsp | The MrsP control to surrender the control of. |
[in,out] | executing | The currently executing thread. |
queue_context | The thread queue context. |
STATUS_SUCCESSFUL | The operation succeeded. |
STATUS_NOT_OWNER | The executing thread does not own the MrsP control. |
Definition at line 445 of file mrspimpl.h.
|
static |
Waits for the ownership of the MrsP control.
[in,out] | mrsp | The MrsP control to get the ownership of. |
[in,out] | executing | The currently executing thread. |
queue_context | the thread queue context. |
STATUS_SUCCESSFUL | The operation succeeded. |
STATUS_MUTEX_CEILING_VIOLATED | The wait priority of the currently executing thread exceeds the ceiling priority. |
STATUS_DEADLOCK | A deadlock occured. |
STATUS_TIMEOUT | A timeout occured. |
Definition at line 334 of file mrspimpl.h.