diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 15:10:27 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 16:17:00 +0200 |
commit | e266d134ebf6f7b7722fffe23c3b4ad142001452 (patch) | |
tree | 7e43e93706be3da460331353b87e58cbb6a9833c | |
parent | score: Rename _Objects_Get_local() (diff) | |
download | rtems-e266d134ebf6f7b7722fffe23c3b4ad142001452.tar.bz2 |
Replace *_Get_interrupt_disable() with *_Get()
Uniformly use *_Get() to get an object by identifier with a lock
context.
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 6d21e96f6e..7627d3d1f7 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 9519c45e52..04088ae201 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 bebb306027..640acc0e5a 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 97d6dff658..f8f003353a 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 e66e98366e..232b2e2a80 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 3c4e26e04a..5c708579f6 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 5d50f14857..40b970dcb1 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 4de1917648..f9dec821da 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 fe2a590252..ee69a9a718 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 4ee5040c14..54b15d2e55 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 7e0c32e03c..b843f931d4 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 30cee97f06..63de97be4b 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 d769d8a520..21908cb2e3 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 8950be263e..db83a1f3bf 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 eb027461cb..1da8fb6ca1 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 6dd8bce224..7959df4505 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 8f3cc206e1..af8c8823ec 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 5a12b85846..199af1cacb 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 670b4809ed..ac55bc7354 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 087ebb864f..8a159fc7f3 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 5aab1b1117..3165fad4db 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 810b74172b..ecf7dab5dd 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 5cd09b6408..40ffb50d20 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 6fa0e4f62e..1150e3295a 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 2c8b90e3e7..467b9ff64a 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 af8f3c9706..9c7ee78e35 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 5220ce845a..eb3b8c2ae8 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 38d4a0e905..ac8f2dd6e3 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 3b1cdb549d..c6c294c5a2 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 b3dcd3c96c..8deb85747c 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 2ebf5c07c2..8f82fafa3f 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 3c6ad277e4..18fb66ab7f 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 9be8460d66..777e306afc 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 97bcabd488..978c49b7ac 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 4f03cbd701..c3ddc77d0a 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 27c21db80b..b24966d047 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 9d8bbb6c41..869e0f540b 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 467281dfca..b6730def20 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 6e4ad96545..9070fe4d0d 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 1bdf421543..e36c8b0591 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 6389e4c795..6caf8620a3 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 d343935cf4..32a77f77ba 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 428ef3dd9d..36fb46d629 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 172979bde3..4b1ceb8a01 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 bd9b89a2af..230a1e00b3 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 66b655d62d..c2ed6eef7b 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 8eec2782c0..26adc9678d 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 49162f6620..faabbbba8d 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 872d4b8df8..6df0f2df3a 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 a16d297b48..608560bf54 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 947a811bce..46049bf2cd 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 61dce7d926..f363f9f204 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 ed10c2bc35..3af8283518 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 54735001e6..d6a145c3d5 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 cbb23abc54..b5044d915f 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 4857d99585..7b0078657b 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 52348df247..da37eee73e 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, |