Invalid rtems_id?

Leon Pollak leonp at plris.com
Thu Mar 20 13:36:38 UTC 2008


On Thursday, 20 בMarch 2008, Sebastian Huber wrote:
> Hi,
> is there a standard way to test if a rtems_id is valid? I want to do the
> following:
>
> if (rtems_id == INVALID) {
>     use default object
> } else {
>     use object associated with rtems_id
> }
As nobody answers...

If you know the type of the ID you are speaking about, you can check it with 
the corresponding manager.
For example, for the task id you may call rtems_task_get_note and will receive 
the RTEMS_INVALID_ID or result.

In my projects, I use the C++ wrapping of the rtems, which is all based on 
rtems_id base class. Obviously, it is very simple there...:)
I can send it to you if you are interested...

-- 
Leon



More information about the users mailing list