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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri May 10 12:19:42 2013 +0200

copperplate/threadobj: cleanup former core specifics in shadow overlay

---

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

diff --git a/lib/copperplate/threadobj.c b/lib/copperplate/threadobj.c
index bacdf5f..2515569 100644
--- a/lib/copperplate/threadobj.c
+++ b/lib/copperplate/threadobj.c
@@ -437,6 +437,7 @@ static inline int threadobj_setup_corespec(struct threadobj 
*thobj)
         * thread, and unlike with set_rr(), threadobj_current() ==
         * thobj is guaranteed in threadobj_setup_corespec().
         */
+       memset(&sev, 0, sizeof(sev));
        sev.sigev_notify = SIGEV_SIGNAL|SIGEV_THREAD_ID;
        sev.sigev_signo = SIGVTALRM;
        sev.sigev_notify_thread_id = copperplate_get_tid();
@@ -915,6 +916,7 @@ int threadobj_prologue(struct threadobj *thobj, const char 
*name)
                assert(current->magic == 0);
                sysgroup_remove(thread, &current->memspec);
                finalize_thread(current);
+               threadobj_cleanup_corespec(current);
                threadobj_free(current);
        } else
                pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);


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

Reply via email to