diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-11-09 14:52:28 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-11-09 14:52:28 +0000 |
commit | 86436f4427d74ae0704f6af146583ed9bdb8c2b7 (patch) | |
tree | 4645b2b869ea778cb8bca53d678793e763eb3066 /cpukit/score | |
parent | 2009-11-09 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-86436f4427d74ae0704f6af146583ed9bdb8c2b7.tar.bz2 |
2009-11-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/inline/rtems/score/coremutex.inl,
score/inline/rtems/score/coresem.inl: Eliminate use of local
variable. This local variable causes unused variable warnings
on some ports.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/inline/rtems/score/coremutex.inl | 15 | ||||
-rw-r--r-- | cpukit/score/inline/rtems/score/coresem.inl | 9 |
2 files changed, 11 insertions, 13 deletions
diff --git a/cpukit/score/inline/rtems/score/coremutex.inl b/cpukit/score/inline/rtems/score/coremutex.inl index bcb86058fe..9f6d749b81 100644 --- a/cpukit/score/inline/rtems/score/coremutex.inl +++ b/cpukit/score/inline/rtems/score/coremutex.inl @@ -130,7 +130,6 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body( ) { Thread_Control *executing; - ISR_Level level = *level_p; /* disabled when you get here */ @@ -154,8 +153,8 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body( } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { - _ISR_Enable( level ); - return 0; + _ISR_Enable( *level_p ); + return 0; } /* else must be CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING * * we possibly bump the priority of the current holder -- which @@ -168,13 +167,13 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body( ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { - _ISR_Enable( level ); + _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); - _ISR_Enable( level ); + _ISR_Enable( *level_p ); _Thread_Change_priority( the_mutex->holder, the_mutex->Attributes.priority_ceiling, @@ -188,7 +187,7 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body( the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ - _ISR_Enable( level ); + _ISR_Enable( *level_p ); return 0; } } @@ -204,11 +203,11 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body( switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; - _ISR_Enable( level ); + _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; - _ISR_Enable( level ); + _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_BLOCKS: break; diff --git a/cpukit/score/inline/rtems/score/coresem.inl b/cpukit/score/inline/rtems/score/coresem.inl index fbb38a7cc1..3608b2d91b 100644 --- a/cpukit/score/inline/rtems/score/coresem.inl +++ b/cpukit/score/inline/rtems/score/coresem.inl @@ -76,13 +76,12 @@ RTEMS_INLINE_ROUTINE uint32_t _CORE_semaphore_Get_count( RTEMS_INLINE_ROUTINE void _CORE_semaphore_Seize_isr_disable( CORE_semaphore_Control *the_semaphore, Objects_Id id, - bool wait, + bool wait, Watchdog_Interval timeout, ISR_Level *level_p ) { Thread_Control *executing; - ISR_Level level = *level_p; /* disabled when you get here */ @@ -90,12 +89,12 @@ RTEMS_INLINE_ROUTINE void _CORE_semaphore_Seize_isr_disable( executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; - _ISR_Enable( level ); + _ISR_Enable( *level_p ); return; } if ( !wait ) { - _ISR_Enable( level ); + _ISR_Enable( *level_p ); executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; return; } @@ -104,7 +103,7 @@ RTEMS_INLINE_ROUTINE void _CORE_semaphore_Seize_isr_disable( _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; - _ISR_Enable( level ); + _ISR_Enable( *level_p ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); _Thread_Enable_dispatch(); |