summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/mutexunlock.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-27 15:41:41 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-30 16:16:23 +0200
commit33e250c9fa370f620ddbc5850342d5a90b123524 (patch)
treea2f4082a58231054f084e9a77aa0af4e3111662d /cpukit/posix/src/mutexunlock.c
parentscore: Add CORE mutex variants (diff)
downloadrtems-33e250c9fa370f620ddbc5850342d5a90b123524.tar.bz2
score: Rework CORE priority ceiling mutex
Rework seize and surrender methods to use CORE_ceiling_mutex_Control. This eliminates CORE_mutex_Disciplines.
Diffstat (limited to 'cpukit/posix/src/mutexunlock.c')
-rw-r--r--cpukit/posix/src/mutexunlock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/posix/src/mutexunlock.c b/cpukit/posix/src/mutexunlock.c
index b0ca33d154..5404cef187 100644
--- a/cpukit/posix/src/mutexunlock.c
+++ b/cpukit/posix/src/mutexunlock.c
@@ -45,6 +45,13 @@ int pthread_mutex_unlock(
executing = _Thread_Executing;
switch ( the_mutex->protocol ) {
+ case POSIX_MUTEX_PRIORITY_CEILING:
+ status = _CORE_ceiling_mutex_Surrender(
+ &the_mutex->Mutex,
+ executing,
+ &queue_context
+ );
+ break;
case POSIX_MUTEX_NO_PROTOCOL:
status = _CORE_recursive_mutex_Surrender_no_protocol(
&the_mutex->Mutex.Recursive,
@@ -54,6 +61,7 @@ int pthread_mutex_unlock(
);
break;
default:
+ _Assert( the_mutex->protocol == POSIX_MUTEX_PRIORITY_INHERIT );
status = _CORE_mutex_Surrender(
&the_mutex->Mutex.Recursive.Mutex,
&queue_context