score: Simplify _Thread_Get_objects_information()

This commit is contained in:
Sebastian Huber
2016-05-04 07:24:30 +02:00
parent 876dde7a7d
commit 8c77150b39
+9 -8
View File
@@ -25,20 +25,21 @@ static Objects_Information *_Thread_Get_objects_information(
Objects_Id id
)
{
uint32_t the_api;
uint32_t the_class;
uint32_t the_api;
the_api = _Objects_Get_API( id );
if ( !_Objects_Is_api_valid( the_api ) ) {
return NULL;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
return NULL;
}
return _Objects_Information_table[ the_api ][ the_class ];
/*
* 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 ];
}
Thread_Control *_Thread_Get(