diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-09-27 15:23:00 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-09-27 15:23:00 +0200 |
commit | 8797c76addf22a2f0ffc3717ff977695e35b9b0b (patch) | |
tree | 75489c28e223e9dcec1dde6ff335ddd595d71f61 /cpukit/posix/src | |
parent | score: Simplify ISR lock name (diff) | |
download | rtems-8797c76addf22a2f0ffc3717ff977695e35b9b0b.tar.bz2 |
score: Unify CORE mutex seize/surrender
Use the Thread_Control::resource_count for the no protocol mutexes.
Merge the no protocol and priority inherit CORE mutex seize/surrender
operations.
Diffstat (limited to 'cpukit/posix/src')
-rw-r--r-- | cpukit/posix/src/mutexlocksupp.c | 3 | ||||
-rw-r--r-- | cpukit/posix/src/mutexunlock.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c index 1da6238d1d..ea4c4e3eab 100644 --- a/cpukit/posix/src/mutexlocksupp.c +++ b/cpukit/posix/src/mutexlocksupp.c @@ -76,7 +76,7 @@ int _POSIX_Mutex_Lock_support( ); break; case POSIX_MUTEX_NO_PROTOCOL: - status = _CORE_recursive_mutex_Seize_no_protocol( + status = _CORE_recursive_mutex_Seize( &the_mutex->Mutex.Recursive, POSIX_MUTEX_NO_PROTOCOL_TQ_OPERATIONS, executing, @@ -89,6 +89,7 @@ int _POSIX_Mutex_Lock_support( _Assert( the_mutex->protocol == POSIX_MUTEX_PRIORITY_INHERIT ); status = _CORE_recursive_mutex_Seize( &the_mutex->Mutex.Recursive, + CORE_MUTEX_TQ_PRIORITY_INHERIT_OPERATIONS, executing, wait, _POSIX_Mutex_Lock_nested, diff --git a/cpukit/posix/src/mutexunlock.c b/cpukit/posix/src/mutexunlock.c index 3144314e5c..c15f7e6ad2 100644 --- a/cpukit/posix/src/mutexunlock.c +++ b/cpukit/posix/src/mutexunlock.c @@ -53,7 +53,7 @@ int pthread_mutex_unlock( ); break; case POSIX_MUTEX_NO_PROTOCOL: - status = _CORE_recursive_mutex_Surrender_no_protocol( + status = _CORE_recursive_mutex_Surrender( &the_mutex->Mutex.Recursive, POSIX_MUTEX_NO_PROTOCOL_TQ_OPERATIONS, executing, @@ -64,6 +64,7 @@ int pthread_mutex_unlock( _Assert( the_mutex->protocol == POSIX_MUTEX_PRIORITY_INHERIT ); status = _CORE_recursive_mutex_Surrender( &the_mutex->Mutex.Recursive, + CORE_MUTEX_TQ_PRIORITY_INHERIT_OPERATIONS, executing, &queue_context ); |