mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-26 09:48:53 +08:00
score: Multiprocessor Resource Sharing Protocol
Add basic support for the 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. These ceiling priorities can be specified with rtems_semaphore_set_priority(). 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. The help out feature is not implemented with this patch.
This commit is contained in:
@@ -1792,6 +1792,17 @@ const rtems_libio_helper rtems_fs_init_helper =
|
||||
CONFIGURE_SEMAPHORES_FOR_FILE_SYSTEMS + \
|
||||
CONFIGURE_NETWORKING_SEMAPHORES)
|
||||
|
||||
#if !defined(RTEMS_SMP) || \
|
||||
!defined(CONFIGURE_MAXIMUM_MRSP_SEMAPHORES)
|
||||
#define CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES 0
|
||||
#else
|
||||
#define CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES \
|
||||
CONFIGURE_MAXIMUM_MRSP_SEMAPHORES * \
|
||||
_Configure_From_workspace( \
|
||||
RTEMS_ARRAY_SIZE(_Scheduler_Table) * sizeof(Priority_Control) \
|
||||
)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If there are no user or support semaphores defined, then we can assume
|
||||
* that no memory need be allocated at all for semaphores.
|
||||
@@ -1800,7 +1811,8 @@ const rtems_libio_helper rtems_fs_init_helper =
|
||||
#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) 0
|
||||
#else
|
||||
#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
|
||||
_Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) )
|
||||
_Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) ) + \
|
||||
CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES
|
||||
#endif
|
||||
|
||||
#ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
|
||||
|
||||
Reference in New Issue
Block a user