diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-16 14:08:20 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-16 14:08:20 +0100 |
commit | 79a998d8629e8603e5df1191483409973f9a119d (patch) | |
tree | 3776fe7ebd330293a43c4ae73117a54469f26aa1 /cpukit/rtems | |
parent | score: Check thread resource count in timer server (diff) | |
download | rtems-79a998d8629e8603e5df1191483409973f9a119d.tar.bz2 |
rtems: rtems_semaphore_flush() with prio inherit
The _Semaphore_Get_operations() must return the proper operations for
priority inheritance semaphores.
Add a test case for rtems_semaphore_flush() with priority inheritance.
Close #3235.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/semimpl.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/semimpl.h b/cpukit/rtems/include/rtems/rtems/semimpl.h index 48b0a84c68..6d0f156e5c 100644 --- a/cpukit/rtems/include/rtems/rtems/semimpl.h +++ b/cpukit/rtems/include/rtems/rtems/semimpl.h @@ -58,11 +58,15 @@ RTEMS_INLINE_ROUTINE const Thread_queue_Operations *_Semaphore_Get_operations( const Semaphore_Control *the_semaphore ) { + if ( the_semaphore->variant == SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY ) { + return &_Thread_queue_Operations_priority_inherit; + } + if ( the_semaphore->discipline == SEMAPHORE_DISCIPLINE_PRIORITY ) { return &_Thread_queue_Operations_priority; - } else { - return &_Thread_queue_Operations_FIFO; } + + return &_Thread_queue_Operations_FIFO; } /** |