[PATCH 15/15] Replace *_Get_interrupt_disable() with *_Get()

Gedare Bloom gedare at rtems.org
Fri May 20 14:08:39 UTC 2016


OK

On Fri, May 20, 2016 at 9:33 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> Uniformly use *_Get() to get an object by identifier with a lock
> context.
> ---
>  cpukit/posix/include/rtems/posix/muteximpl.h      |  2 +-
>  cpukit/posix/src/cancel.c                         |  2 +-
>  cpukit/posix/src/mutexdestroy.c                   |  2 +-
>  cpukit/posix/src/mutexget.c                       |  2 +-
>  cpukit/posix/src/mutexgetprioceiling.c            |  2 +-
>  cpukit/posix/src/mutexlocksupp.c                  |  2 +-
>  cpukit/posix/src/mutexsetprioceiling.c            |  2 +-
>  cpukit/posix/src/mutexunlock.c                    |  2 +-
>  cpukit/posix/src/pthreaddetach.c                  |  2 +-
>  cpukit/posix/src/pthreadequal.c                   |  4 ++--
>  cpukit/posix/src/pthreadgetaffinitynp.c           |  2 +-
>  cpukit/posix/src/pthreadgetattrnp.c               |  2 +-
>  cpukit/posix/src/pthreadgetschedparam.c           |  2 +-
>  cpukit/posix/src/pthreadjoin.c                    |  2 +-
>  cpukit/posix/src/pthreadkill.c                    |  2 +-
>  cpukit/posix/src/pthreadsetaffinitynp.c           |  2 +-
>  cpukit/posix/src/pthreadsetschedparam.c           |  2 +-
>  cpukit/rtems/include/rtems/rtems/messageimpl.h    |  3 +--
>  cpukit/rtems/include/rtems/rtems/semimpl.h        |  2 +-
>  cpukit/rtems/src/eventsend.c                      |  2 +-
>  cpukit/rtems/src/msgqbroadcast.c                  |  5 +----
>  cpukit/rtems/src/msgqdelete.c                     |  2 +-
>  cpukit/rtems/src/msgqflush.c                      |  5 +----
>  cpukit/rtems/src/msgqgetnumberpending.c           |  5 +----
>  cpukit/rtems/src/msgqreceive.c                    |  5 +----
>  cpukit/rtems/src/msgqsend.c                       |  5 +----
>  cpukit/rtems/src/msgqurgent.c                     |  5 +----
>  cpukit/rtems/src/semdelete.c                      |  2 +-
>  cpukit/rtems/src/semflush.c                       |  2 +-
>  cpukit/rtems/src/semobtain.c                      |  2 +-
>  cpukit/rtems/src/semrelease.c                     |  2 +-
>  cpukit/rtems/src/semsetpriority.c                 |  5 +----
>  cpukit/rtems/src/signalsend.c                     |  2 +-
>  cpukit/rtems/src/systemeventsend.c                |  2 +-
>  cpukit/rtems/src/taskdelete.c                     |  2 +-
>  cpukit/rtems/src/taskgetaffinity.c                |  2 +-
>  cpukit/rtems/src/taskgetscheduler.c               |  2 +-
>  cpukit/rtems/src/taskissuspended.c                |  2 +-
>  cpukit/rtems/src/taskrestart.c                    |  2 +-
>  cpukit/rtems/src/taskresume.c                     |  2 +-
>  cpukit/rtems/src/tasksetaffinity.c                |  2 +-
>  cpukit/rtems/src/tasksetpriority.c                |  2 +-
>  cpukit/rtems/src/tasksetscheduler.c               |  2 +-
>  cpukit/rtems/src/taskstart.c                      |  2 +-
>  cpukit/rtems/src/tasksuspend.c                    |  2 +-
>  cpukit/score/include/rtems/score/threadimpl.h     |  2 +-
>  cpukit/score/src/mpci.c                           |  2 +-
>  cpukit/score/src/schedulercbsattachthread.c       |  2 +-
>  cpukit/score/src/schedulercbsdetachthread.c       |  2 +-
>  cpukit/score/src/schedulercbsgetexecutiontime.c   |  2 +-
>  cpukit/score/src/schedulercbsgetremainingbudget.c |  2 +-
>  cpukit/score/src/threadget.c                      |  2 +-
>  testsuites/smptests/smpmigration02/init.c         |  2 +-
>  testsuites/smptests/smpscheduler03/init.c         |  2 +-
>  testsuites/sptests/spintrcritical22/init.c        |  2 +-
>  testsuites/sptests/spintrcritical23/init.c        |  2 +-
>  testsuites/tmtests/tm26/task1.c                   | 15 ++++++---------
>  57 files changed, 63 insertions(+), 88 deletions(-)
>
> diff --git a/cpukit/posix/include/rtems/posix/muteximpl.h b/cpukit/posix/include/rtems/posix/muteximpl.h
> index 6d21e96..7627d3d 100644
> --- a/cpukit/posix/include/rtems/posix/muteximpl.h
> +++ b/cpukit/posix/include/rtems/posix/muteximpl.h
> @@ -126,7 +126,7 @@ RTEMS_INLINE_ROUTINE int _POSIX_Mutex_Translate_core_mutex_return_code(
>   *
>   *  @note: This version of the method uses an interrupt critical section.
>   */
> -POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable(
> +POSIX_Mutex_Control *_POSIX_Mutex_Get(
>    pthread_mutex_t  *mutex,
>    ISR_lock_Context *lock_context
>  );
> diff --git a/cpukit/posix/src/cancel.c b/cpukit/posix/src/cancel.c
> index 9519c45..04088ae 100644
> --- a/cpukit/posix/src/cancel.c
> +++ b/cpukit/posix/src/cancel.c
> @@ -45,7 +45,7 @@ int pthread_cancel( pthread_t thread )
>      return EPROTO;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( thread, &lock_context );
> +  the_thread = _Thread_Get( thread, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return ESRCH;
> diff --git a/cpukit/posix/src/mutexdestroy.c b/cpukit/posix/src/mutexdestroy.c
> index bebb306..640acc0 100644
> --- a/cpukit/posix/src/mutexdestroy.c
> +++ b/cpukit/posix/src/mutexdestroy.c
> @@ -34,7 +34,7 @@ int pthread_mutex_destroy(
>
>    _Objects_Allocator_lock();
>
> -  the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &lock_context );
> +  the_mutex = _POSIX_Mutex_Get( mutex, &lock_context );
>
>    if ( the_mutex != NULL ) {
>      _CORE_mutex_Acquire_critical( &the_mutex->Mutex, &lock_context );
> diff --git a/cpukit/posix/src/mutexget.c b/cpukit/posix/src/mutexget.c
> index 97d6dff..f8f0033 100644
> --- a/cpukit/posix/src/mutexget.c
> +++ b/cpukit/posix/src/mutexget.c
> @@ -21,7 +21,7 @@
>  #include <rtems/posix/muteximpl.h>
>  #include <rtems/posix/posixapi.h>
>
> -POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable(
> +POSIX_Mutex_Control *_POSIX_Mutex_Get(
>    pthread_mutex_t  *mutex,
>    ISR_lock_Context *lock_context
>  )
> diff --git a/cpukit/posix/src/mutexgetprioceiling.c b/cpukit/posix/src/mutexgetprioceiling.c
> index e66e983..232b2e2 100644
> --- a/cpukit/posix/src/mutexgetprioceiling.c
> +++ b/cpukit/posix/src/mutexgetprioceiling.c
> @@ -37,7 +37,7 @@ int pthread_mutex_getprioceiling(
>      return EINVAL;
>    }
>
> -  the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &lock_context );
> +  the_mutex = _POSIX_Mutex_Get( mutex, &lock_context );
>
>    if ( the_mutex == NULL ) {
>      return EINVAL;
> diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c
> index 3c4e26e..5c70857 100644
> --- a/cpukit/posix/src/mutexlocksupp.c
> +++ b/cpukit/posix/src/mutexlocksupp.c
> @@ -32,7 +32,7 @@ int _POSIX_Mutex_Lock_support(
>    ISR_lock_Context     lock_context;
>    Thread_Control      *executing;
>
> -  the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &lock_context );
> +  the_mutex = _POSIX_Mutex_Get( mutex, &lock_context );
>
>    if ( the_mutex == NULL ) {
>      return EINVAL;
> diff --git a/cpukit/posix/src/mutexsetprioceiling.c b/cpukit/posix/src/mutexsetprioceiling.c
> index 5d50f14..40b970d 100644
> --- a/cpukit/posix/src/mutexsetprioceiling.c
> +++ b/cpukit/posix/src/mutexsetprioceiling.c
> @@ -57,7 +57,7 @@ int pthread_mutex_setprioceiling(
>     *  NOTE: This makes it easier to get 100% binary coverage since the
>     *        bad Id case is handled by the switch.
>     */
> -  the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &lock_context );
> +  the_mutex = _POSIX_Mutex_Get( mutex, &lock_context );
>
>    if ( the_mutex == NULL ) {
>      return EINVAL;
> diff --git a/cpukit/posix/src/mutexunlock.c b/cpukit/posix/src/mutexunlock.c
> index 4de1917..f9dec82 100644
> --- a/cpukit/posix/src/mutexunlock.c
> +++ b/cpukit/posix/src/mutexunlock.c
> @@ -34,7 +34,7 @@ int pthread_mutex_unlock(
>    CORE_mutex_Status    status;
>    ISR_lock_Context     lock_context;
>
> -  the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &lock_context );
> +  the_mutex = _POSIX_Mutex_Get( mutex, &lock_context );
>
>    if ( the_mutex == NULL ) {
>      return EINVAL;
> diff --git a/cpukit/posix/src/pthreaddetach.c b/cpukit/posix/src/pthreaddetach.c
> index fe2a590..ee69a9a 100644
> --- a/cpukit/posix/src/pthreaddetach.c
> +++ b/cpukit/posix/src/pthreaddetach.c
> @@ -34,7 +34,7 @@ int pthread_detach( pthread_t thread )
>    ISR_lock_Context  lock_context;
>    Per_CPU_Control  *cpu_self;
>
> -  the_thread = _Thread_Get_interrupt_disable( thread, &lock_context );
> +  the_thread = _Thread_Get( thread, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return ESRCH;
> diff --git a/cpukit/posix/src/pthreadequal.c b/cpukit/posix/src/pthreadequal.c
> index 4ee5040..54b15d2 100644
> --- a/cpukit/posix/src/pthreadequal.c
> +++ b/cpukit/posix/src/pthreadequal.c
> @@ -45,8 +45,8 @@ int pthread_equal(
>    Thread_Control   *thread_1;
>    Thread_Control   *thread_2;
>
> -  thread_1 = _Thread_Get_interrupt_disable( t1, &lock_context_1 );
> -  thread_2 = _Thread_Get_interrupt_disable( t2, &lock_context_2 );
> +  thread_1 = _Thread_Get( t1, &lock_context_1 );
> +  thread_2 = _Thread_Get( t2, &lock_context_2 );
>    _ISR_lock_ISR_enable( &lock_context_2 );
>    _ISR_lock_ISR_enable( &lock_context_1 );
>
> diff --git a/cpukit/posix/src/pthreadgetaffinitynp.c b/cpukit/posix/src/pthreadgetaffinitynp.c
> index 7e0c32e..b843f93 100644
> --- a/cpukit/posix/src/pthreadgetaffinitynp.c
> +++ b/cpukit/posix/src/pthreadgetaffinitynp.c
> @@ -45,7 +45,7 @@ int pthread_getaffinity_np(
>      return EFAULT;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( thread, &lock_context );
> +  the_thread = _Thread_Get( thread, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return ESRCH;
> diff --git a/cpukit/posix/src/pthreadgetattrnp.c b/cpukit/posix/src/pthreadgetattrnp.c
> index 30cee97..63de97b 100644
> --- a/cpukit/posix/src/pthreadgetattrnp.c
> +++ b/cpukit/posix/src/pthreadgetattrnp.c
> @@ -38,7 +38,7 @@ int pthread_getattr_np(
>      return EINVAL;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( thread, &lock_context );
> +  the_thread = _Thread_Get( thread, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return ESRCH;
> diff --git a/cpukit/posix/src/pthreadgetschedparam.c b/cpukit/posix/src/pthreadgetschedparam.c
> index d769d8a..21908cb 100644
> --- a/cpukit/posix/src/pthreadgetschedparam.c
> +++ b/cpukit/posix/src/pthreadgetschedparam.c
> @@ -42,7 +42,7 @@ int pthread_getschedparam(
>      return EINVAL;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( thread, &lock_context );
> +  the_thread = _Thread_Get( thread, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return ESRCH;
> diff --git a/cpukit/posix/src/pthreadjoin.c b/cpukit/posix/src/pthreadjoin.c
> index 8950be2..db83a1f 100644
> --- a/cpukit/posix/src/pthreadjoin.c
> +++ b/cpukit/posix/src/pthreadjoin.c
> @@ -37,7 +37,7 @@ static int _POSIX_Threads_Join( pthread_t thread, void **value_ptr )
>    Thread_Control    *executing;
>    void              *value;
>
> -  the_thread = _Thread_Get_interrupt_disable( thread, &lock_context );
> +  the_thread = _Thread_Get( thread, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return ESRCH;
> diff --git a/cpukit/posix/src/pthreadkill.c b/cpukit/posix/src/pthreadkill.c
> index eb02746..1da8fb6 100644
> --- a/cpukit/posix/src/pthreadkill.c
> +++ b/cpukit/posix/src/pthreadkill.c
> @@ -39,7 +39,7 @@ int pthread_kill( pthread_t thread, int sig )
>      return EINVAL;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( thread, &lock_context );
> +  the_thread = _Thread_Get( thread, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return ESRCH;
> diff --git a/cpukit/posix/src/pthreadsetaffinitynp.c b/cpukit/posix/src/pthreadsetaffinitynp.c
> index 6dd8bce..7959df4 100644
> --- a/cpukit/posix/src/pthreadsetaffinitynp.c
> +++ b/cpukit/posix/src/pthreadsetaffinitynp.c
> @@ -45,7 +45,7 @@ int pthread_setaffinity_np(
>      return EFAULT;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( thread, &lock_context );
> +  the_thread = _Thread_Get( thread, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return ESRCH;
> diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c
> index 8f3cc20..af8c882 100644
> --- a/cpukit/posix/src/pthreadsetschedparam.c
> +++ b/cpukit/posix/src/pthreadsetschedparam.c
> @@ -65,7 +65,7 @@ int pthread_setschedparam(
>      return eno;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( thread, &lock_context );
> +  the_thread = _Thread_Get( thread, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return ESRCH;
> diff --git a/cpukit/rtems/include/rtems/rtems/messageimpl.h b/cpukit/rtems/include/rtems/rtems/messageimpl.h
> index 5a12b85..199af1c 100644
> --- a/cpukit/rtems/include/rtems/rtems/messageimpl.h
> +++ b/cpukit/rtems/include/rtems/rtems/messageimpl.h
> @@ -101,8 +101,7 @@ RTEMS_INLINE_ROUTINE void _Message_queue_Free (
>    _Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
>  }
>
> -RTEMS_INLINE_ROUTINE Message_queue_Control *
> -_Message_queue_Get_interrupt_disable(
> +RTEMS_INLINE_ROUTINE Message_queue_Control * _Message_queue_Get(
>    Objects_Id         id,
>    ISR_lock_Context  *lock_context
>  )
> diff --git a/cpukit/rtems/include/rtems/rtems/semimpl.h b/cpukit/rtems/include/rtems/rtems/semimpl.h
> index 670b480..ac55bc7 100644
> --- a/cpukit/rtems/include/rtems/rtems/semimpl.h
> +++ b/cpukit/rtems/include/rtems/rtems/semimpl.h
> @@ -134,7 +134,7 @@ RTEMS_INLINE_ROUTINE void _Semaphore_Free (
>    _Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
>  }
>
> -RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get_interrupt_disable(
> +RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get(
>    Objects_Id         id,
>    ISR_lock_Context  *lock_context
>  )
> diff --git a/cpukit/rtems/src/eventsend.c b/cpukit/rtems/src/eventsend.c
> index 087ebb8..8a159fc 100644
> --- a/cpukit/rtems/src/eventsend.c
> +++ b/cpukit/rtems/src/eventsend.c
> @@ -31,7 +31,7 @@ rtems_status_code rtems_event_send(
>    RTEMS_API_Control *api;
>    ISR_lock_Context   lock_context;
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/msgqbroadcast.c b/cpukit/rtems/src/msgqbroadcast.c
> index 5aab1b1..3165fad 100644
> --- a/cpukit/rtems/src/msgqbroadcast.c
> +++ b/cpukit/rtems/src/msgqbroadcast.c
> @@ -39,10 +39,7 @@ rtems_status_code rtems_message_queue_broadcast(
>      return RTEMS_INVALID_ADDRESS;
>    }
>
> -  the_message_queue = _Message_queue_Get_interrupt_disable(
> -    id,
> -    &lock_context
> -  );
> +  the_message_queue = _Message_queue_Get( id, &lock_context );
>
>    if ( the_message_queue == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/msgqdelete.c b/cpukit/rtems/src/msgqdelete.c
> index 810b741..ecf7dab 100644
> --- a/cpukit/rtems/src/msgqdelete.c
> +++ b/cpukit/rtems/src/msgqdelete.c
> @@ -29,7 +29,7 @@ rtems_status_code rtems_message_queue_delete(
>    ISR_lock_Context       lock_context;
>
>    _Objects_Allocator_lock();
> -  the_message_queue = _Message_queue_Get_interrupt_disable( id, &lock_context );
> +  the_message_queue = _Message_queue_Get( id, &lock_context );
>
>    if ( the_message_queue == NULL ) {
>      _Objects_Allocator_unlock();
> diff --git a/cpukit/rtems/src/msgqflush.c b/cpukit/rtems/src/msgqflush.c
> index 5cd09b6..40ffb50 100644
> --- a/cpukit/rtems/src/msgqflush.c
> +++ b/cpukit/rtems/src/msgqflush.c
> @@ -32,10 +32,7 @@ rtems_status_code rtems_message_queue_flush(
>      return RTEMS_INVALID_ADDRESS;
>    }
>
> -  the_message_queue = _Message_queue_Get_interrupt_disable(
> -    id,
> -    &lock_context
> -  );
> +  the_message_queue = _Message_queue_Get( id, &lock_context );
>
>    if ( the_message_queue == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/msgqgetnumberpending.c b/cpukit/rtems/src/msgqgetnumberpending.c
> index 6fa0e4f..1150e32 100644
> --- a/cpukit/rtems/src/msgqgetnumberpending.c
> +++ b/cpukit/rtems/src/msgqgetnumberpending.c
> @@ -32,10 +32,7 @@ rtems_status_code rtems_message_queue_get_number_pending(
>      return RTEMS_INVALID_ADDRESS;
>    }
>
> -  the_message_queue = _Message_queue_Get_interrupt_disable(
> -    id,
> -    &lock_context
> -  );
> +  the_message_queue = _Message_queue_Get( id, &lock_context );
>
>    if ( the_message_queue == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/msgqreceive.c b/cpukit/rtems/src/msgqreceive.c
> index 2c8b90e..467b9ff 100644
> --- a/cpukit/rtems/src/msgqreceive.c
> +++ b/cpukit/rtems/src/msgqreceive.c
> @@ -47,10 +47,7 @@ rtems_status_code rtems_message_queue_receive(
>      return RTEMS_INVALID_ADDRESS;
>    }
>
> -  the_message_queue = _Message_queue_Get_interrupt_disable(
> -    id,
> -    &lock_context
> -  );
> +  the_message_queue = _Message_queue_Get( id, &lock_context );
>
>    if ( the_message_queue == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/msgqsend.c b/cpukit/rtems/src/msgqsend.c
> index af8f3c9..9c7ee78 100644
> --- a/cpukit/rtems/src/msgqsend.c
> +++ b/cpukit/rtems/src/msgqsend.c
> @@ -34,10 +34,7 @@ rtems_status_code rtems_message_queue_send(
>      return RTEMS_INVALID_ADDRESS;
>    }
>
> -  the_message_queue = _Message_queue_Get_interrupt_disable(
> -    id,
> -    &lock_context
> -  );
> +  the_message_queue = _Message_queue_Get( id, &lock_context );
>
>    if ( the_message_queue == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/msgqurgent.c b/cpukit/rtems/src/msgqurgent.c
> index 5220ce8..eb3b8c2 100644
> --- a/cpukit/rtems/src/msgqurgent.c
> +++ b/cpukit/rtems/src/msgqurgent.c
> @@ -34,10 +34,7 @@ rtems_status_code rtems_message_queue_urgent(
>      return RTEMS_INVALID_ADDRESS;
>    }
>
> -  the_message_queue = _Message_queue_Get_interrupt_disable(
> -    id,
> -    &lock_context
> -  );
> +  the_message_queue = _Message_queue_Get( id, &lock_context );
>
>    if ( the_message_queue == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/semdelete.c b/cpukit/rtems/src/semdelete.c
> index 38d4a0e..ac8f2dd 100644
> --- a/cpukit/rtems/src/semdelete.c
> +++ b/cpukit/rtems/src/semdelete.c
> @@ -30,7 +30,7 @@ rtems_status_code rtems_semaphore_delete(
>    rtems_attribute    attribute_set;
>
>    _Objects_Allocator_lock();
> -  the_semaphore = _Semaphore_Get_interrupt_disable( id, &lock_context );
> +  the_semaphore = _Semaphore_Get( id, &lock_context );
>
>    if ( the_semaphore == NULL ) {
>      _Objects_Allocator_unlock();
> diff --git a/cpukit/rtems/src/semflush.c b/cpukit/rtems/src/semflush.c
> index 3b1cdb5..c6c294c 100644
> --- a/cpukit/rtems/src/semflush.c
> +++ b/cpukit/rtems/src/semflush.c
> @@ -27,7 +27,7 @@ rtems_status_code rtems_semaphore_flush( rtems_id id )
>    ISR_lock_Context   lock_context;
>    rtems_attribute    attribute_set;
>
> -  the_semaphore = _Semaphore_Get_interrupt_disable( id, &lock_context );
> +  the_semaphore = _Semaphore_Get( id, &lock_context );
>
>    if ( the_semaphore == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/semobtain.c b/cpukit/rtems/src/semobtain.c
> index b3dcd3c..8deb857 100644
> --- a/cpukit/rtems/src/semobtain.c
> +++ b/cpukit/rtems/src/semobtain.c
> @@ -45,7 +45,7 @@ rtems_status_code rtems_semaphore_obtain(
>    rtems_attribute    attribute_set;
>    bool               wait;
>
> -  the_semaphore = _Semaphore_Get_interrupt_disable( id, &lock_context );
> +  the_semaphore = _Semaphore_Get( id, &lock_context );
>
>    if ( the_semaphore == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/semrelease.c b/cpukit/rtems/src/semrelease.c
> index 2ebf5c0..8f82faf 100644
> --- a/cpukit/rtems/src/semrelease.c
> +++ b/cpukit/rtems/src/semrelease.c
> @@ -32,7 +32,7 @@ rtems_status_code rtems_semaphore_release( rtems_id id )
>    rtems_attribute        attribute_set;
>    ISR_lock_Context       lock_context;
>
> -  the_semaphore = _Semaphore_Get_interrupt_disable( id, &lock_context );
> +  the_semaphore = _Semaphore_Get( id, &lock_context );
>
>    if ( the_semaphore == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/semsetpriority.c b/cpukit/rtems/src/semsetpriority.c
> index 3c6ad27..18fb66a 100644
> --- a/cpukit/rtems/src/semsetpriority.c
> +++ b/cpukit/rtems/src/semsetpriority.c
> @@ -103,10 +103,7 @@ rtems_status_code rtems_semaphore_set_priority(
>      return RTEMS_INVALID_ID;
>    }
>
> -  the_semaphore = _Semaphore_Get_interrupt_disable(
> -    semaphore_id,
> -    &lock_context
> -  );
> +  the_semaphore = _Semaphore_Get( semaphore_id, &lock_context );
>
>    if ( the_semaphore == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/signalsend.c b/cpukit/rtems/src/signalsend.c
> index 9be8460..777e306 100644
> --- a/cpukit/rtems/src/signalsend.c
> +++ b/cpukit/rtems/src/signalsend.c
> @@ -38,7 +38,7 @@ rtems_status_code rtems_signal_send(
>      return RTEMS_INVALID_NUMBER;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/systemeventsend.c b/cpukit/rtems/src/systemeventsend.c
> index 97bcabd..978c49b 100644
> --- a/cpukit/rtems/src/systemeventsend.c
> +++ b/cpukit/rtems/src/systemeventsend.c
> @@ -37,7 +37,7 @@ rtems_status_code rtems_event_system_send(
>    RTEMS_API_Control *api;
>    ISR_lock_Context   lock_context;
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/taskdelete.c b/cpukit/rtems/src/taskdelete.c
> index 4f03cbd..c3ddc77 100644
> --- a/cpukit/rtems/src/taskdelete.c
> +++ b/cpukit/rtems/src/taskdelete.c
> @@ -30,7 +30,7 @@ rtems_status_code rtems_task_delete(
>    Thread_Control   *executing;
>    Per_CPU_Control  *cpu_self;
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/taskgetaffinity.c b/cpukit/rtems/src/taskgetaffinity.c
> index 27c21db..b24966d 100644
> --- a/cpukit/rtems/src/taskgetaffinity.c
> +++ b/cpukit/rtems/src/taskgetaffinity.c
> @@ -40,7 +40,7 @@ rtems_status_code rtems_task_get_affinity(
>      return RTEMS_INVALID_ADDRESS;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/taskgetscheduler.c b/cpukit/rtems/src/taskgetscheduler.c
> index 9d8bbb6..869e0f5 100644
> --- a/cpukit/rtems/src/taskgetscheduler.c
> +++ b/cpukit/rtems/src/taskgetscheduler.c
> @@ -32,7 +32,7 @@ rtems_status_code rtems_task_get_scheduler(
>      return RTEMS_INVALID_ADDRESS;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( task_id, &lock_context );
> +  the_thread = _Thread_Get( task_id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/taskissuspended.c b/cpukit/rtems/src/taskissuspended.c
> index 467281d..b6730de 100644
> --- a/cpukit/rtems/src/taskissuspended.c
> +++ b/cpukit/rtems/src/taskissuspended.c
> @@ -27,7 +27,7 @@ rtems_status_code rtems_task_is_suspended( rtems_id id )
>    ISR_lock_Context  lock_context;
>    States_Control    current_state;
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/taskrestart.c b/cpukit/rtems/src/taskrestart.c
> index 6e4ad96..9070fe4 100644
> --- a/cpukit/rtems/src/taskrestart.c
> +++ b/cpukit/rtems/src/taskrestart.c
> @@ -31,7 +31,7 @@ rtems_status_code rtems_task_restart(
>    Thread_Entry_information  entry;
>    bool                      ok;
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/taskresume.c b/cpukit/rtems/src/taskresume.c
> index 1bdf421..e36c8b0 100644
> --- a/cpukit/rtems/src/taskresume.c
> +++ b/cpukit/rtems/src/taskresume.c
> @@ -30,7 +30,7 @@ rtems_status_code rtems_task_resume(
>    Per_CPU_Control  *cpu_self;
>    States_Control    previous_state;
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/tasksetaffinity.c b/cpukit/rtems/src/tasksetaffinity.c
> index 6389e4c..6caf862 100644
> --- a/cpukit/rtems/src/tasksetaffinity.c
> +++ b/cpukit/rtems/src/tasksetaffinity.c
> @@ -40,7 +40,7 @@ rtems_status_code rtems_task_set_affinity(
>      return RTEMS_INVALID_ADDRESS;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/tasksetpriority.c b/cpukit/rtems/src/tasksetpriority.c
> index d343935..32a77f7 100644
> --- a/cpukit/rtems/src/tasksetpriority.c
> +++ b/cpukit/rtems/src/tasksetpriority.c
> @@ -38,7 +38,7 @@ rtems_status_code rtems_task_set_priority(
>    if ( !old_priority )
>      return RTEMS_INVALID_ADDRESS;
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/tasksetscheduler.c b/cpukit/rtems/src/tasksetscheduler.c
> index 428ef3d..36fb46d 100644
> --- a/cpukit/rtems/src/tasksetscheduler.c
> +++ b/cpukit/rtems/src/tasksetscheduler.c
> @@ -36,7 +36,7 @@ rtems_status_code rtems_task_set_scheduler(
>      return RTEMS_INVALID_ID;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( task_id, &lock_context );
> +  the_thread = _Thread_Get( task_id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/taskstart.c b/cpukit/rtems/src/taskstart.c
> index 172979b..4b1ceb8 100644
> --- a/cpukit/rtems/src/taskstart.c
> +++ b/cpukit/rtems/src/taskstart.c
> @@ -40,7 +40,7 @@ rtems_status_code rtems_task_start(
>    ISR_lock_Context  lock_context;
>    bool              ok;
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/rtems/src/tasksuspend.c b/cpukit/rtems/src/tasksuspend.c
> index bd9b89a..230a1e0 100644
> --- a/cpukit/rtems/src/tasksuspend.c
> +++ b/cpukit/rtems/src/tasksuspend.c
> @@ -30,7 +30,7 @@ rtems_status_code rtems_task_suspend(
>    Per_CPU_Control  *cpu_self;
>    States_Control    previous_state;
>
> -  the_thread = _Thread_Get_interrupt_disable( id, &lock_context );
> +  the_thread = _Thread_Get( id, &lock_context );
>
>    if ( the_thread == NULL ) {
>  #if defined(RTEMS_MULTIPROCESSING)
> diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h
> index 66b655d..c2ed6ee 100644
> --- a/cpukit/score/include/rtems/score/threadimpl.h
> +++ b/cpukit/score/include/rtems/score/threadimpl.h
> @@ -582,7 +582,7 @@ RTEMS_INLINE_ROUTINE Objects_Information *_Thread_Get_objects_information(
>   *
>   * @see _Objects_Get().
>   */
> -Thread_Control *_Thread_Get_interrupt_disable(
> +Thread_Control *_Thread_Get(
>    Objects_Id         id,
>    ISR_lock_Context  *lock_context
>  );
> diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
> index 8eec278..26adc96 100644
> --- a/cpukit/score/src/mpci.c
> +++ b/cpukit/score/src/mpci.c
> @@ -295,7 +295,7 @@ Thread_Control *_MPCI_Process_response (
>    ISR_lock_Context  lock_context;
>    Thread_Control   *the_thread;
>
> -  the_thread = _Thread_Get_interrupt_disable( the_packet->id, &lock_context );
> +  the_thread = _Thread_Get( the_packet->id, &lock_context );
>    _Assert( the_thread != NULL );
>
>    /*
> diff --git a/cpukit/score/src/schedulercbsattachthread.c b/cpukit/score/src/schedulercbsattachthread.c
> index 49162f6..faabbbb 100644
> --- a/cpukit/score/src/schedulercbsattachthread.c
> +++ b/cpukit/score/src/schedulercbsattachthread.c
> @@ -45,7 +45,7 @@ int _Scheduler_CBS_Attach_thread (
>      return SCHEDULER_CBS_ERROR_FULL;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( task_id, &lock_context );
> +  the_thread = _Thread_Get( task_id, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
> diff --git a/cpukit/score/src/schedulercbsdetachthread.c b/cpukit/score/src/schedulercbsdetachthread.c
> index 872d4b8..6df0f2d 100644
> --- a/cpukit/score/src/schedulercbsdetachthread.c
> +++ b/cpukit/score/src/schedulercbsdetachthread.c
> @@ -46,7 +46,7 @@ int _Scheduler_CBS_Detach_thread (
>      return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( task_id, &lock_context );
> +  the_thread = _Thread_Get( task_id, &lock_context );
>
>    if ( the_thread == NULL ) {
>      return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
> diff --git a/cpukit/score/src/schedulercbsgetexecutiontime.c b/cpukit/score/src/schedulercbsgetexecutiontime.c
> index a16d297..608560b 100644
> --- a/cpukit/score/src/schedulercbsgetexecutiontime.c
> +++ b/cpukit/score/src/schedulercbsgetexecutiontime.c
> @@ -47,7 +47,7 @@ int _Scheduler_CBS_Get_execution_time (
>      return SCHEDULER_CBS_OK;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( server->task_id, &lock_context );
> +  the_thread = _Thread_Get( server->task_id, &lock_context );
>
>    if ( the_thread != NULL ) {
>      *exec_time = server->parameters.budget - the_thread->cpu_time_budget;
> diff --git a/cpukit/score/src/schedulercbsgetremainingbudget.c b/cpukit/score/src/schedulercbsgetremainingbudget.c
> index 947a811..46049bf 100644
> --- a/cpukit/score/src/schedulercbsgetremainingbudget.c
> +++ b/cpukit/score/src/schedulercbsgetremainingbudget.c
> @@ -45,7 +45,7 @@ int _Scheduler_CBS_Get_remaining_budget (
>      return SCHEDULER_CBS_OK;
>    }
>
> -  the_thread = _Thread_Get_interrupt_disable( server->task_id, &lock_context );
> +  the_thread = _Thread_Get( server->task_id, &lock_context );
>
>    if ( the_thread != NULL ) {
>      *remaining_budget = the_thread->cpu_time_budget;
> diff --git a/cpukit/score/src/threadget.c b/cpukit/score/src/threadget.c
> index 61dce7d..f363f9f 100644
> --- a/cpukit/score/src/threadget.c
> +++ b/cpukit/score/src/threadget.c
> @@ -21,7 +21,7 @@
>
>  #include <rtems/score/threadimpl.h>
>
> -Thread_Control *_Thread_Get_interrupt_disable(
> +Thread_Control *_Thread_Get(
>    Objects_Id         id,
>    ISR_lock_Context  *lock_context
>  )
> diff --git a/testsuites/smptests/smpmigration02/init.c b/testsuites/smptests/smpmigration02/init.c
> index ed10c2b..3af8283 100644
> --- a/testsuites/smptests/smpmigration02/init.c
> +++ b/testsuites/smptests/smpmigration02/init.c
> @@ -121,7 +121,7 @@ static Thread_Control *get_thread_by_id(rtems_id task_id)
>    ISR_lock_Context lock_context;
>    Thread_Control *thread;
>
> -  thread = _Thread_Get_interrupt_disable(task_id, &lock_context);
> +  thread = _Thread_Get(task_id, &lock_context);
>    rtems_test_assert(thread != NULL);
>    _ISR_lock_ISR_enable(&lock_context);
>
> diff --git a/testsuites/smptests/smpscheduler03/init.c b/testsuites/smptests/smpscheduler03/init.c
> index 5473500..d6a145c 100644
> --- a/testsuites/smptests/smpscheduler03/init.c
> +++ b/testsuites/smptests/smpscheduler03/init.c
> @@ -103,7 +103,7 @@ static Thread_Control *get_thread_by_id(rtems_id task_id)
>    ISR_lock_Context lock_context;
>    Thread_Control *thread;
>
> -  thread = _Thread_Get_interrupt_disable(task_id, &lock_context);
> +  thread = _Thread_Get(task_id, &lock_context);
>    rtems_test_assert(thread != NULL);
>    _ISR_lock_ISR_enable(&lock_context);
>
> diff --git a/testsuites/sptests/spintrcritical22/init.c b/testsuites/sptests/spintrcritical22/init.c
> index cbb23ab..b5044d9 100644
> --- a/testsuites/sptests/spintrcritical22/init.c
> +++ b/testsuites/sptests/spintrcritical22/init.c
> @@ -36,7 +36,7 @@ static Semaphore_Control *get_semaphore_control(rtems_id id)
>    ISR_lock_Context lock_context;
>    Semaphore_Control *sem;
>
> -  sem = _Semaphore_Get_interrupt_disable(id, &lock_context);
> +  sem = _Semaphore_Get(id, &lock_context);
>    rtems_test_assert(sem != NULL);
>    _ISR_lock_ISR_enable(&lock_context);
>
> diff --git a/testsuites/sptests/spintrcritical23/init.c b/testsuites/sptests/spintrcritical23/init.c
> index 4857d99..7b00786 100644
> --- a/testsuites/sptests/spintrcritical23/init.c
> +++ b/testsuites/sptests/spintrcritical23/init.c
> @@ -45,7 +45,7 @@ static Thread_Control *get_tcb(rtems_id id)
>    ISR_lock_Context lock_context;
>    Thread_Control *tcb;
>
> -  tcb = _Thread_Get_interrupt_disable(id, &lock_context);
> +  tcb = _Thread_Get(id, &lock_context);
>    rtems_test_assert(tcb != NULL);
>    _ISR_lock_ISR_enable(&lock_context);
>
> diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
> index 52348df..da37eee 100644
> --- a/testsuites/tmtests/tm26/task1.c
> +++ b/testsuites/tmtests/tm26/task1.c
> @@ -506,24 +506,21 @@ void complete_test( void )
>
>    benchmark_timer_initialize();
>      for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
> -      (void) _Thread_Get_interrupt_disable( task_id, &lock_context );
> +      (void) _Thread_Get( task_id, &lock_context );
>        _ISR_lock_ISR_enable( &lock_context );
>      }
>    thread_get_time = benchmark_timer_read();
>
>    benchmark_timer_initialize();
>      for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
> -      (void) _Semaphore_Get_interrupt_disable(
> -        Semaphore_id,
> -        &lock_context
> -      );
> +      (void) _Semaphore_Get( Semaphore_id, &lock_context );
>        _ISR_lock_ISR_enable( &lock_context );
>      }
>    semaphore_get_time = benchmark_timer_read();
>
>    benchmark_timer_initialize();
>      for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
> -      (void) _Thread_Get_interrupt_disable( 0x3, &lock_context );
> +      (void) _Thread_Get( 0x3, &lock_context );
>        _ISR_lock_ISR_enable( &lock_context );
>      }
>    thread_get_invalid_time = benchmark_timer_read();
> @@ -687,7 +684,7 @@ void complete_test( void )
>    );
>
>    put_time(
> -    "rtems internal: _Thread_Get_interrupt_disable",
> +    "rtems internal: _Thread_Get",
>      thread_get_time,
>      OPERATION_COUNT,
>      0,
> @@ -695,7 +692,7 @@ void complete_test( void )
>    );
>
>    put_time(
> -    "rtems internal: _Semaphore_Get_interrupt_disable",
> +    "rtems internal: _Semaphore_Get",
>      semaphore_get_time,
>      OPERATION_COUNT,
>      0,
> @@ -703,7 +700,7 @@ void complete_test( void )
>    );
>
>    put_time(
> -    "rtems internal: _Thread_Get_interrupt_disable: invalid id",
> +    "rtems internal: _Thread_Get: invalid id",
>      thread_get_invalid_time,
>      OPERATION_COUNT,
>      0,
> --
> 1.8.4.5
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list