Documentation for struct threadobj_stat on Alchemy
A message that is not in the archive (sent off-list or not yet received): [email protected]
In Alchemy RT_TASK_INFO has a member struct threadobj_stat which is undocumented (https://xenomai.org//documentation/xenomai-3/html/xeno3prm/structRT__TASK__INFO.html).
Looking at the source of copperplate/threadobj.h (https://xenomai.org//documentation/xenomai-3/html/xeno3prm/threadobj_8h_source.html) , it turns out it has these members:
struct threadobj_stat {
ticks_t xtime;
ticks_t timeout;
uint64_t msw;
uint64_t csw;
uint64_t xsc;
int cpu;
int schedlock;
unsigned int status;
uint32_t pf;
};
I could not find a documentation of what they are and even a straight forward comparison with rt_task_info from Xenomai 2.6 (http://www.xenomai.org/documentation/trunk/html/api/structrt__task__info.html) does not give an idea of what all of these are (e.g.: timeout, xsc, cpu, schedlock).
The migration guide (https://xenomai.org/migrating-from-xenomai-2-x-to-3-x/) only says "other fields which represent runtime statistics are now avail from a core-specific stat field sub-structure."
Thanks,
Giulio
Quoted 5 lines · Giulio Moro
In Alchemy
RT_TASK_INFOhas a member structthreadobj_statwhich is undocumented (https://xenomai.org//documentation/xenomai-3/html/xeno3prm/structRT__TASK__INFO.html).
Looking at the source ofcopperplate/threadobj.h(https://xenomai.org//documentation/xenomai-3/html/xeno3prm/threadobj_8h_source.html) , it turns out it has these members:struct
threadobj_stat{
ticks_txtime;
Total execution time in primary mode (ns)
Quoted 1 line
ticks_ttimeout;
Pending timeout (ns)
Quoted 1 line
uint64_tmsw;
Total count of mode switches (primary -> secondary)
Quoted 1 line
uint64_tcsw;
Total count of context switches
Quoted 1 line
uint64_txsc;
Total count of Cobalt system calls.
Quoted 1 line
int cpu;
Current CPU.
Quoted 1 line
int schedlock;
Scheduler lock depth count.
Quoted 1 line
unsigned int status;
Internal status bits (from uapi/kernel/thread.h, state flags)
Quoted 1 line
uint32_tpf;
Number of page faults in primary mode. Debug stuff, should be zero.
Signature · 1 line
Philippe.