Module: xenomai-forge
Branch: master
Commit: 9fb51889860d32b00faad3ec25db3f0ff3026260
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=9fb51889860d32b00faad3ec25db3f0ff3026260

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Jul 23 15:55:47 2013 +0200

copperplate/threadobj: store current pthread id from prologue code

---

 lib/copperplate/threadobj.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/copperplate/threadobj.c b/lib/copperplate/threadobj.c
index ddbf92d..b8c4fb2 100644
--- a/lib/copperplate/threadobj.c
+++ b/lib/copperplate/threadobj.c
@@ -961,6 +961,8 @@ int threadobj_prologue(struct threadobj *thobj, const char 
*name)
        } else
                *thobj->name = '\0';
 
+       thobj->tid = pthread_self();
+       thobj->pid = copperplate_get_tid();
        thobj->errno_pointer = &errno;
        backtrace_init_context(&thobj->btd, name);
        ret = threadobj_setup_corespec(thobj);
@@ -968,7 +970,6 @@ int threadobj_prologue(struct threadobj *thobj, const char 
*name)
                return __bt(ret);
 
        threadobj_set_current(thobj);
-       thobj->pid = copperplate_get_tid();
 
        /*
         * Link the thread to the shared queue, so that sysregd can


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to