diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-19 14:14:31 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-21 07:29:40 +0200 |
commit | 88575577fa70f6a6c6800acb35e77e0ca12891b8 (patch) | |
tree | 75fe037f5bbf74bb7e50972f126a8c06cb58ce5c | |
parent | score: Optimize _Objects_Get_no_protection() (diff) | |
download | rtems-88575577fa70f6a6c6800acb35e77e0ca12891b8.tar.bz2 |
score: Optimize _Objects_Get_local()
Make the id the first parameter since usual callers get the object
identifier as the first parameter themself.
-rw-r--r-- | cpukit/posix/include/rtems/posix/spinlockimpl.h | 2 | ||||
-rw-r--r-- | cpukit/posix/include/rtems/posix/timerimpl.h | 2 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/ratemonimpl.h | 2 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/timerimpl.h | 2 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/objectimpl.h | 7 | ||||
-rw-r--r-- | cpukit/score/src/objectgetlocal.c | 2 |
6 files changed, 9 insertions, 8 deletions
diff --git a/cpukit/posix/include/rtems/posix/spinlockimpl.h b/cpukit/posix/include/rtems/posix/spinlockimpl.h index 0904050288..c5aa343fd1 100644 --- a/cpukit/posix/include/rtems/posix/spinlockimpl.h +++ b/cpukit/posix/include/rtems/posix/spinlockimpl.h @@ -85,8 +85,8 @@ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get( } return (POSIX_Spinlock_Control *) _Objects_Get_local( - &_POSIX_Spinlock_Information, *spinlock, + &_POSIX_Spinlock_Information, lock_context ); } diff --git a/cpukit/posix/include/rtems/posix/timerimpl.h b/cpukit/posix/include/rtems/posix/timerimpl.h index bf25629529..95ccc4e32b 100644 --- a/cpukit/posix/include/rtems/posix/timerimpl.h +++ b/cpukit/posix/include/rtems/posix/timerimpl.h @@ -98,8 +98,8 @@ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( ) { return (POSIX_Timer_Control *) _Objects_Get_local( - &_POSIX_Timer_Information, (Objects_Id) id, + &_POSIX_Timer_Information, lock_context ); } diff --git a/cpukit/rtems/include/rtems/rtems/ratemonimpl.h b/cpukit/rtems/include/rtems/rtems/ratemonimpl.h index 28837a2c16..200ff801ff 100644 --- a/cpukit/rtems/include/rtems/rtems/ratemonimpl.h +++ b/cpukit/rtems/include/rtems/rtems/ratemonimpl.h @@ -90,7 +90,7 @@ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get( ) { return (Rate_monotonic_Control *) - _Objects_Get_local( &_Rate_monotonic_Information, id, lock_context ); + _Objects_Get_local( id, &_Rate_monotonic_Information, lock_context ); } void _Rate_monotonic_Timeout( Watchdog_Control *watchdog ); diff --git a/cpukit/rtems/include/rtems/rtems/timerimpl.h b/cpukit/rtems/include/rtems/rtems/timerimpl.h index 40e2b5fe9c..9a52762d7b 100644 --- a/cpukit/rtems/include/rtems/rtems/timerimpl.h +++ b/cpukit/rtems/include/rtems/rtems/timerimpl.h @@ -88,8 +88,8 @@ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get( ) { return (Timer_Control *) _Objects_Get_local( - &_Timer_Information, id, + &_Timer_Information, lock_context ); } diff --git a/cpukit/score/include/rtems/score/objectimpl.h b/cpukit/score/include/rtems/score/objectimpl.h index fb45977c1d..776c871e18 100644 --- a/cpukit/score/include/rtems/score/objectimpl.h +++ b/cpukit/score/include/rtems/score/objectimpl.h @@ -629,9 +629,10 @@ Objects_Control *_Objects_Get_isr_disable( * an associated object exists, then interrupts remain disabled, otherwise the * previous interrupt state is restored. * + * @param id The object identifier. This is the first parameter since usual + * callers get the object identifier as the first parameter themself. * @param information The object class information block. - * @param[in] id The object identifier. - * @param[in] lock_context The interrupt lock context. + * @param lock_context The interrupt lock context. * * @retval NULL No associated object exists. * @retval other The pointer to the associated object control block. @@ -639,8 +640,8 @@ Objects_Control *_Objects_Get_isr_disable( * context via _ISR_lock_ISR_enable() or _ISR_lock_Release_and_ISR_enable(). */ Objects_Control *_Objects_Get_local( - const Objects_Information *information, Objects_Id id, + const Objects_Information *information, ISR_lock_Context *lock_context ); diff --git a/cpukit/score/src/objectgetlocal.c b/cpukit/score/src/objectgetlocal.c index 8a93a765c9..1134095b27 100644 --- a/cpukit/score/src/objectgetlocal.c +++ b/cpukit/score/src/objectgetlocal.c @@ -26,8 +26,8 @@ #include <rtems/score/objectimpl.h> Objects_Control *_Objects_Get_local( - const Objects_Information *information, Objects_Id id, + const Objects_Information *information, ISR_lock_Context *lock_context ) { |