forked from Imagelibrary/rtems
rtems: Allow RTEMS_PRIORITY for MrsP semaphores
In order to improve the compatibility of RTEMS 5.2 with future version of RTEMS which fixed #4346 allow MrsP semaphores to be created with RTEMS_PRIORITY. Close #4347.
This commit is contained in:
@@ -92,9 +92,14 @@ rtems_status_code rtems_semaphore_create(
|
|||||||
) {
|
) {
|
||||||
variant = SEMAPHORE_VARIANT_MUTEX_PRIORITY_CEILING;
|
variant = SEMAPHORE_VARIANT_MUTEX_PRIORITY_CEILING;
|
||||||
} else if (
|
} else if (
|
||||||
mutex_with_protocol
|
( mutex_with_protocol & ~RTEMS_PRIORITY )
|
||||||
== ( RTEMS_BINARY_SEMAPHORE | RTEMS_MULTIPROCESSOR_RESOURCE_SHARING )
|
== ( RTEMS_BINARY_SEMAPHORE | RTEMS_MULTIPROCESSOR_RESOURCE_SHARING )
|
||||||
) {
|
) {
|
||||||
|
/*
|
||||||
|
* In RTEMS 5.2 using RTEMS_FIFO and RTEMS_PRIORITY for MrsP semaphores is
|
||||||
|
* allowed. In RTEMS 6, RTEMS_PRIORITY is required for MrsP semaphores
|
||||||
|
* analogous to priority ceiling semaphores.
|
||||||
|
*/
|
||||||
#if defined(RTEMS_SMP)
|
#if defined(RTEMS_SMP)
|
||||||
variant = SEMAPHORE_VARIANT_MRSP;
|
variant = SEMAPHORE_VARIANT_MRSP;
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -70,12 +70,6 @@ static void test_mrsp_create_errors(void)
|
|||||||
| RTEMS_SIMPLE_BINARY_SEMAPHORE
|
| RTEMS_SIMPLE_BINARY_SEMAPHORE
|
||||||
);
|
);
|
||||||
|
|
||||||
create_not_defined(
|
|
||||||
RTEMS_MULTIPROCESSOR_RESOURCE_SHARING
|
|
||||||
| RTEMS_BINARY_SEMAPHORE
|
|
||||||
| RTEMS_PRIORITY
|
|
||||||
);
|
|
||||||
|
|
||||||
create_not_defined(
|
create_not_defined(
|
||||||
RTEMS_MULTIPROCESSOR_RESOURCE_SHARING
|
RTEMS_MULTIPROCESSOR_RESOURCE_SHARING
|
||||||
| RTEMS_INHERIT_PRIORITY
|
| RTEMS_INHERIT_PRIORITY
|
||||||
|
|||||||
Reference in New Issue
Block a user