summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/semobtain.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-27 08:02:03 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-30 16:16:23 +0200
commit5a598ac99b0de720a04afc5e2ac6764117589b90 (patch)
tree811d57df33c0f4fcc1cce61095cb5c0a33eadd7c /cpukit/rtems/src/semobtain.c
parentposix: Delete POSIX_Mutex_Protocol::process_shared (diff)
downloadrtems-5a598ac99b0de720a04afc5e2ac6764117589b90.tar.bz2
score: Add CORE mutex variants
Add CORE_recursive_mutex_Control and CORE_ceiling_mutex_Control to avoid the run-time evaluation of attributes to figure out how a particular mutex methods should behave. Start with the no protocol variants. This eliminates the CORE_MUTEX_DISCIPLINES_FIFO and CORE_MUTEX_DISCIPLINES_PRIORITY disciplines.
Diffstat (limited to 'cpukit/rtems/src/semobtain.c')
-rw-r--r--cpukit/rtems/src/semobtain.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/cpukit/rtems/src/semobtain.c b/cpukit/rtems/src/semobtain.c
index 5eebfa14b2..a7774d6f91 100644
--- a/cpukit/rtems/src/semobtain.c
+++ b/cpukit/rtems/src/semobtain.c
@@ -29,7 +29,7 @@ THREAD_QUEUE_OBJECT_ASSERT(
THREAD_QUEUE_OBJECT_ASSERT(
Semaphore_Control,
- Core_control.mutex.Wait_queue
+ Core_control.Mutex.Recursive.Mutex.Wait_queue
);
THREAD_QUEUE_OBJECT_ASSERT(
@@ -83,13 +83,24 @@ rtems_status_code rtems_semaphore_obtain(
#endif
case SEMAPHORE_VARIANT_MUTEX:
status = _CORE_mutex_Seize(
- &the_semaphore->Core_control.mutex,
+ &the_semaphore->Core_control.Mutex.Recursive.Mutex,
executing,
wait,
timeout,
&queue_context
);
break;
+ case SEMAPHORE_VARIANT_MUTEX_NO_PROTOCOL:
+ status = _CORE_recursive_mutex_Seize_no_protocol(
+ &the_semaphore->Core_control.Mutex.Recursive,
+ _Semaphore_Get_operations( the_semaphore ),
+ executing,
+ wait,
+ timeout,
+ _CORE_recursive_mutex_Seize_nested,
+ &queue_context
+ );
+ break;
default:
_Assert(
the_semaphore->variant == SEMAPHORE_VARIANT_SIMPLE_BINARY