mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-15 11:10:11 +08:00
2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/inline/rtems/score/object.inl: Add _Objects_Is_api_valid.
This commit is contained in:
1 parent
52e70cf409
commit
1ccbd63a6a
2 files changed
+21
No files matched your search
@@ -1,3 +1,7 @@
|
||||
2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* score/inline/rtems/score/object.inl: Add _Objects_Is_api_valid.
|
||||
|
||||
2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* score/src/threadget.c: Use _Objects_Is_api_valid rather than open
|
||||
|
||||
@@ -100,6 +100,23 @@ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index(
|
||||
return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function returns TRUE if the api is valid.
|
||||
*
|
||||
* @param[in] the_api is the api portion of an object ID.
|
||||
*
|
||||
* @return This method returns TRUE if the specified api value is valid
|
||||
* and FALSE otherwise.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE boolean _Objects_Is_api_valid(
|
||||
uint32_t the_api
|
||||
)
|
||||
{
|
||||
if ( !the_api || the_api > OBJECTS_APIS_LAST )
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function returns TRUE if the class is valid.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user