Module: xenomai-forge
Branch: next
Commit: 7044a55b219d83b8e2d28274904c2e397876a655
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7044a55b219d83b8e2d28274904c2e397876a655

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Apr 23 12:31:25 2014 +0200

alchemy/task: export kernel tid to RT_TASK_INFO

---

 include/alchemy/task.h |    4 ++++
 lib/alchemy/task.c     |    1 +
 2 files changed, 5 insertions(+)

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

Reply via email to