summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-25 14:23:48 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-26 21:44:30 +0200
commit39bcf7417ea39806e4817a9ce72cfc20c060c4bf (patch)
treedc05ee9c4d99d8eb98adae586c462e5e84227a1b /cpukit/score
parenttestsuites: Fix locked_printf() test printer (diff)
downloadrtems-39bcf7417ea39806e4817a9ce72cfc20c060c4bf.tar.bz2
Fix semaphore post overflow status
Close #2720.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/coresemimpl.h3
-rw-r--r--cpukit/score/src/mpci.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/coresemimpl.h b/cpukit/score/include/rtems/score/coresemimpl.h
index 1660c1d089..5dad11bc46 100644
--- a/cpukit/score/include/rtems/score/coresemimpl.h
+++ b/cpukit/score/include/rtems/score/coresemimpl.h
@@ -149,6 +149,7 @@ RTEMS_INLINE_ROUTINE void _CORE_semaphore_Destroy(
*/
RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Surrender(
CORE_semaphore_Control *the_semaphore,
+ uint32_t maximum_count,
Thread_queue_Context *queue_context
)
{
@@ -171,7 +172,7 @@ RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Surrender(
queue_context
);
} else {
- if ( the_semaphore->count < UINT32_MAX )
+ if ( the_semaphore->count < maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index 4022a800f1..3442bbd2c7 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -374,7 +374,7 @@ void _MPCI_Announce ( void )
Thread_queue_Context queue_context;
_ISR_lock_ISR_disable( &queue_context.Lock_context );
- (void) _CORE_semaphore_Surrender( &_MPCI_Semaphore, &queue_context );
+ (void) _CORE_semaphore_Surrender( &_MPCI_Semaphore, UINT32_MAX, &queue_context );
}
void _MPCI_Internal_packets_Send_process_packet (