mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-10 16:08:12 +08:00
score: Add _Thread_MP_Is_remote()
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
@@ -91,6 +91,17 @@ Thread_Control *_Thread_MP_Find_proxy (
|
||||
*/
|
||||
void _Thread_MP_Free_proxy( Thread_Control *the_thread );
|
||||
|
||||
RTEMS_INLINE_ROUTINE bool _Thread_MP_Is_remote( Objects_Id id )
|
||||
{
|
||||
Objects_Information *information;
|
||||
|
||||
information = _Thread_Get_objects_information( id );
|
||||
if ( information == NULL ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return _Objects_MP_Is_remote( information, id ) == OBJECTS_REMOTE;
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
||||
@@ -21,27 +21,6 @@
|
||||
|
||||
#include <rtems/score/threadimpl.h>
|
||||
|
||||
static 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 ];
|
||||
}
|
||||
|
||||
Thread_Control *_Thread_Get(
|
||||
Objects_Id id,
|
||||
Objects_Locations *location
|
||||
|
||||
Reference in New Issue
Block a user