rtems_xxxx_ident() does not support global search for all objects in the classic API

Joel Sherrill joel.sherrill at OARcorp.com
Tue Oct 9 22:36:18 UTC 2012


On 10/9/2012 4:47 PM, Andrei Dimitrief-Jianu wrote:
> Hello,
>
> Below are two different implementations for rtems_xxxx_ident()
> directive, one for semaphores and the second for barriers.
>
> rtems_status_code rtems_semaphore_ident(
>    rtems_name  name,
>    uint32_t    node,
>    rtems_id   *id
> )
> {
>    Objects_Name_or_id_lookup_errors  status;
>
>    status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id );
>
>    return _Status_Object_name_errors_to_status[ status ];
> }
>
> rtems_status_code rtems_barrier_ident(
>    rtems_name  name,
>    rtems_id   *id
> )
> {
>    Objects_Name_or_id_lookup_errors  status;
>
>    status = _Objects_Name_to_id_u32( &_Barrier_Information, name,
> OBJECTS_SEARCH_LOCAL_NODE, id );
>
>    return _Status_Object_name_errors_to_status[ status ];
> }
>
> Anyone can explain why for barriers the search is done only on the
> local node? Was it simply an implementation choice? Any other reason
> for that?
It is much simpler than you think. If the Object Class supports remote 
operations
(e.g., global attribute on create and helpers internally), then it has 
the three argument
form. Otherwise it takes the two argument form.

Timers and Rate Monotonic Periods are strictly local. Two argument form.

Barriers COULD be global but don't implement that so they use the two 
argument form.

In general terms, only the objects originally required to be global by the
RTEID/ORKID specification support global operations. The development and
testing effort has never been put into adding global support on more recent
Object classes even when it logically could make sense to support it.
>
> Thanks!
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the devel mailing list