summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-16 14:08:20 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-16 14:08:20 +0100
commit79a998d8629e8603e5df1191483409973f9a119d (patch)
tree3776fe7ebd330293a43c4ae73117a54469f26aa1 /cpukit/rtems
parentscore: Check thread resource count in timer server (diff)
downloadrtems-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.h8
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;
}
/**