diff options
Diffstat (limited to 'cpukit/score/include/rtems/score/threadimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index b19a6dcae0..1fea4da6ca 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -482,6 +482,27 @@ void _Thread_Set_priority( bool prepend_it ); +RTEMS_INLINE_ROUTINE Objects_Information *_Thread_Get_objects_information( + Objects_Id id +) +{ + uint32_t the_api; + + the_api = _Objects_Get_API( id ); + + if ( !_Objects_Is_api_valid( the_api ) ) { + return NULL; + } + + /* + * Threads are always first class :) + * + * There is no need to validate the object class of the object identifier, + * since this will be done by the object get methods. + */ + return _Objects_Information_table[ the_api ][ 1 ]; +} + /** * @brief Maps thread Id to a TCB pointer. * |