fusion userspace query tools ?
Philippe Gerum
rpm at xenomai.org
Wed Jul 20 09:10:43 CEST 2005
Jim Cromie wrote:
>
> Steven Seeger asked earlier about 'top' not showing rtai-tasks,
> which got me thinking..
>
> rtobjs: if it existed, it would output a table of objects known to the
> registry.
> ex:
> 'mytimer', obj-type, handle, ownerpid, accessibility
>
> obj-type is oneof: timer, alarm, task, semaphore, mailbox, queue, etc
>
> access ? Im presuming that the handle is a user-process-address.
> If so, it cant be shared by other processes.
>
Handles are address-space independent, so that a given 32bit handle
value always refers to the same object, regardless of the context.
> I could imagine a printout somewhat like ps -H, ie a hierarchy representing
> control/ownership of rt objects. This would be a great representation of
> an rt-app's design.
>
> unfortunately, I dont see a function in the registry services docs that
> allows one to query - both rt_registry_{get,fetch} take handles, which
> implies that its really expensive to do an exhaustive scan of memory for
> valid handles.
>
> is there any way to iterate thru all registry entries ?
> what am I missing ?
>
In skin/rtai/registry.c, the __rtai_obj_busyq queue head links all
active register slots, each of which refers to a registered object (sem,
task, mutex etc.). A register slot is of type RT_OBJECT; from there, we
can determine everything we need to know, including the corresponding
handle, which is equivalent to (slot - &__rtai_obj_slots[0]).
Additionally, each active registry slot is hashed on the corresponding
object name.
>
> rttop - does what top does, but for rtai/fusion, modify as appropriate.
>
> _______________________________________________
> RTAI mailing list
> RTAI at rtai.org
> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai
--
Philippe.
More information about the Rtai
mailing list