From 0a68d8e45ae1c979f350213ed9c174b86e0c7fdf Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Sun, 1 May 2016 16:11:30 +0200 Subject: score: Optimize _Objects_Get_local() Make the interrupt lock context the second parameter to avoid register moves. --- cpukit/posix/include/rtems/posix/barrierimpl.h | 4 ++-- cpukit/posix/include/rtems/posix/mqueueimpl.h | 15 +-------------- cpukit/posix/include/rtems/posix/semaphoreimpl.h | 4 ++-- cpukit/posix/include/rtems/posix/spinlockimpl.h | 4 ++-- cpukit/posix/include/rtems/posix/timerimpl.h | 4 ++-- 5 files changed, 9 insertions(+), 22 deletions(-) (limited to 'cpukit/posix/include/rtems') diff --git a/cpukit/posix/include/rtems/posix/barrierimpl.h b/cpukit/posix/include/rtems/posix/barrierimpl.h index 16ccdc5138..f4c350ed95 100644 --- a/cpukit/posix/include/rtems/posix/barrierimpl.h +++ b/cpukit/posix/include/rtems/posix/barrierimpl.h @@ -84,8 +84,8 @@ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( { return (POSIX_Barrier_Control *) _Objects_Get_local( (Objects_Id) *barrier, - &_POSIX_Barrier_Information, - lock_context + lock_context, + &_POSIX_Barrier_Information ); } diff --git a/cpukit/posix/include/rtems/posix/mqueueimpl.h b/cpukit/posix/include/rtems/posix/mqueueimpl.h index 491f716a47..9d13226f3e 100644 --- a/cpukit/posix/include/rtems/posix/mqueueimpl.h +++ b/cpukit/posix/include/rtems/posix/mqueueimpl.h @@ -112,7 +112,7 @@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get( ) { return (POSIX_Message_queue_Control *) - _Objects_Get_local( id, &_POSIX_Message_queue_Information, lock_context ); + _Objects_Get_local( id, lock_context, &_POSIX_Message_queue_Information ); } /* @@ -163,19 +163,6 @@ RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove ( &_POSIX_Message_queue_Information, &the_mq->Object ); } -RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control * -_POSIX_Message_queue_Get_interrupt_disable( - mqd_t id, - ISR_lock_Context *lock_context -) -{ - return (POSIX_Message_queue_Control *) _Objects_Get_local( - (Objects_Id) id, - &_POSIX_Message_queue_Information, - lock_context - ); -} - RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control * _POSIX_Message_queue_Get_by_name( const char *name, diff --git a/cpukit/posix/include/rtems/posix/semaphoreimpl.h b/cpukit/posix/include/rtems/posix/semaphoreimpl.h index 6ec8480929..a4090441c6 100644 --- a/cpukit/posix/include/rtems/posix/semaphoreimpl.h +++ b/cpukit/posix/include/rtems/posix/semaphoreimpl.h @@ -67,8 +67,8 @@ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get( { return (POSIX_Semaphore_Control *) _Objects_Get_local( (Objects_Id) *id, - &_POSIX_Semaphore_Information, - lock_context + lock_context, + &_POSIX_Semaphore_Information ); } diff --git a/cpukit/posix/include/rtems/posix/spinlockimpl.h b/cpukit/posix/include/rtems/posix/spinlockimpl.h index c5aa343fd1..80de3d1001 100644 --- a/cpukit/posix/include/rtems/posix/spinlockimpl.h +++ b/cpukit/posix/include/rtems/posix/spinlockimpl.h @@ -86,8 +86,8 @@ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get( return (POSIX_Spinlock_Control *) _Objects_Get_local( *spinlock, - &_POSIX_Spinlock_Information, - lock_context + lock_context, + &_POSIX_Spinlock_Information ); } diff --git a/cpukit/posix/include/rtems/posix/timerimpl.h b/cpukit/posix/include/rtems/posix/timerimpl.h index 95ccc4e32b..5a6cf28631 100644 --- a/cpukit/posix/include/rtems/posix/timerimpl.h +++ b/cpukit/posix/include/rtems/posix/timerimpl.h @@ -99,8 +99,8 @@ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( { return (POSIX_Timer_Control *) _Objects_Get_local( (Objects_Id) id, - &_POSIX_Timer_Information, - lock_context + lock_context, + &_POSIX_Timer_Information ); } -- cgit v1.2.3