Module: xenomai-forge Branch: next Commit: 7e031df19360ae6e6fa5e27d8eeeece07fd65926 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7e031df19360ae6e6fa5e27d8eeeece07fd65926
Author: Philippe Gerum <r...@xenomai.org> Date: Wed Apr 23 12:31:25 2014 +0200 alchemy/task: export kernel tid to RT_TASK_INFO --- doc/asciidoc/MIGRATION.adoc | 2 ++ include/alchemy/task.h | 4 ++++ lib/alchemy/task.c | 1 + 3 files changed, 7 insertions(+) diff --git a/doc/asciidoc/MIGRATION.adoc b/doc/asciidoc/MIGRATION.adoc index a013447..b7a5787 100644 --- a/doc/asciidoc/MIGRATION.adoc +++ b/doc/asciidoc/MIGRATION.adoc @@ -724,6 +724,8 @@ Rationale: This behavior can be achieved by not calling corresponding information is too short-lived to be valuable to the caller. The task's base priority is still available from the +prio+ field. + * new field +pid+ represents the Linux kernel task identifier for + the Alchemy task, as obtained from syscall(__NR_gettid). * other fields which represent runtime statistics are now avail from a core-specific +stat+ field sub-structure. diff --git a/include/alchemy/task.h b/include/alchemy/task.h index 7a2eb1c..0387e57 100644 --- a/include/alchemy/task.h +++ b/include/alchemy/task.h @@ -76,6 +76,10 @@ struct RT_TASK_INFO { * Name of task. */ char name[XNOBJECT_NAME_LEN]; + /** + * Host pid. + */ + pid_t pid; }; typedef struct RT_TASK_INFO RT_TASK_INFO; diff --git a/lib/alchemy/task.c b/lib/alchemy/task.c index 8d106fc..254aa5f 100644 --- a/lib/alchemy/task.c +++ b/lib/alchemy/task.c @@ -1480,6 +1480,7 @@ int rt_task_inquire(RT_TASK *task, RT_TASK_INFO *info) strcpy(info->name, tcb->name); info->prio = threadobj_get_priority(&tcb->thobj); + info->pid = threadobj_get_pid(&tcb->thobj); put_alchemy_task(tcb); out: _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git