diff options
Diffstat (limited to 'cpukit/rtems/src/taskgetnote.c')
-rw-r--r-- | cpukit/rtems/src/taskgetnote.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpukit/rtems/src/taskgetnote.c b/cpukit/rtems/src/taskgetnote.c index 9748a1d5da..f1e6b00bd7 100644 --- a/cpukit/rtems/src/taskgetnote.c +++ b/cpukit/rtems/src/taskgetnote.c @@ -43,6 +43,7 @@ rtems_status_code rtems_task_get_note( register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; + Thread_Control *executing; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; @@ -62,9 +63,10 @@ rtems_status_code rtems_task_get_note( * Optimize the most likely case to avoid the Thread_Dispatch. */ + executing = _Thread_Get_executing(); if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || - _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { - api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; + _Objects_Are_ids_equal( id, executing->Object.id ) ) { + api = executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } @@ -80,7 +82,7 @@ rtems_status_code rtems_task_get_note( #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: - _Thread_Executing->Wait.return_argument = note; + executing->Wait.return_argument = note; return _RTEMS_tasks_MP_Send_request_packet( RTEMS_TASKS_MP_GET_NOTE_REQUEST, |