diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-22 08:52:50 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-29 07:26:43 +0200 |
commit | 97bbf028e63447091a56a4be69134fbff1adece6 (patch) | |
tree | ae60634e413f1dc5149c6cd0188623e591be8ea3 /cpukit/score | |
parent | score: Remove Thread_queue_Queue::operations field (diff) | |
download | rtems-97bbf028e63447091a56a4be69134fbff1adece6.tar.bz2 |
score: Use constant for maximum count of CORE sema
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/include/rtems/score/coresem.h | 13 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/coresemimpl.h | 4 | ||||
-rw-r--r-- | cpukit/score/src/coresem.c | 3 | ||||
-rw-r--r-- | cpukit/score/src/mpci.c | 1 |
4 files changed, 1 insertions, 20 deletions
diff --git a/cpukit/score/include/rtems/score/coresem.h b/cpukit/score/include/rtems/score/coresem.h index 44e17c3d20..84fde0b892 100644 --- a/cpukit/score/include/rtems/score/coresem.h +++ b/cpukit/score/include/rtems/score/coresem.h @@ -50,15 +50,6 @@ typedef enum { } CORE_semaphore_Disciplines; /** - * The following defines the control block used to manage the - * attributes of each semaphore. - */ -typedef struct { - /** This element indicates the maximum count this semaphore may have. */ - uint32_t maximum_count; -} CORE_semaphore_Attributes; - -/** * The following defines the control block used to manage each * counting semaphore. */ @@ -73,10 +64,6 @@ typedef struct { */ const Thread_queue_Operations *operations; - /** This element is the set of attributes which define this instance's - * behavior. - */ - CORE_semaphore_Attributes Attributes; /** This element contains the current count of this semaphore. */ uint32_t count; } CORE_semaphore_Control; diff --git a/cpukit/score/include/rtems/score/coresemimpl.h b/cpukit/score/include/rtems/score/coresemimpl.h index 365345a219..c70e54f36c 100644 --- a/cpukit/score/include/rtems/score/coresemimpl.h +++ b/cpukit/score/include/rtems/score/coresemimpl.h @@ -87,13 +87,11 @@ typedef void ( *CORE_semaphore_API_mp_support_callout )( * * @param[in] the_semaphore is the semaphore to initialize * @param[in] discipline the blocking discipline - * @param[in] maximum_count the maximum count * @param[in] initial_value is the initial count of the semaphore */ void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Disciplines discipline, - uint32_t maximum_count, uint32_t initial_value ); @@ -158,7 +156,7 @@ RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Surrender( _Thread_Dispatch_enable( _Per_CPU_Get() ); #endif } else { - if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) + if ( the_semaphore->count < UINT32_MAX ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; diff --git a/cpukit/score/src/coresem.c b/cpukit/score/src/coresem.c index db2d47f872..2bdd81c76a 100644 --- a/cpukit/score/src/coresem.c +++ b/cpukit/score/src/coresem.c @@ -23,12 +23,9 @@ void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Disciplines discipline, - uint32_t maximum_count, uint32_t initial_value ) { - - the_semaphore->Attributes.maximum_count = maximum_count; the_semaphore->count = initial_value; _Thread_queue_Initialize( &the_semaphore->Wait_queue ); diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c index 8e93d74dd9..132d3e542d 100644 --- a/cpukit/score/src/mpci.c +++ b/cpukit/score/src/mpci.c @@ -120,7 +120,6 @@ static void _MPCI_Handler_initialization( void ) _CORE_semaphore_Initialize( &_MPCI_Semaphore, CORE_SEMAPHORE_DISCIPLINES_FIFO, - 0xffffffff, 0 /* initial_value */ ); } |