Gsellmann Peter wrote: > Hi! > > I searched for a while and found this snippet > > RT_TASK *rt = rt_task_self(); > int x = rt->thread_base.stat.csw; > > should give the number of context switches, but: > RT_TASK in non-kernel mode is only RT_TASK_PLACEHOLDER so i have no > access to thread_base! > > Is there an official way to get this info (w/o opening > "/proc/xenomai/...")? >
Not yet. You could extend RT_TASK_INFO with this statistic (obtained via rt_task_inquire). There is currently work in progress to add accumulated execution times to the same interface, so this extension would fit quite well. Patches always welcome. Jan
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
