summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/coresemimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/include/rtems/score/coresemimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/coresemimpl.h3
1 files changed, 2 insertions, 1 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;