Module: xenomai-gch
Branch: u_mode
Commit: bada9086709d7bfe8332acd8358d51245df3ea3f
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=bada9086709d7bfe8332acd8358d51245df3ea3f

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sun Jun 19 14:50:56 2011 +0200

native: move mps fastlock deallocation to task deletion hook

---

 ksrc/skins/native/task.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ksrc/skins/native/task.c b/ksrc/skins/native/task.c
index 874ed5b..da4e626 100644
--- a/ksrc/skins/native/task.c
+++ b/ksrc/skins/native/task.c
@@ -74,6 +74,11 @@ static void __task_delete_hook(xnthread_t *thread)
 
        task = thread2rtask(thread);
 
+#if defined(CONFIG_XENO_OPT_NATIVE_MPS) && defined(CONFIG_XENO_FASTSYNCH)
+       xnheap_free(&xnsys_ppd_get(0)->sem_heap,
+                   task->msendq.fastlock);
+#endif
+
 #ifdef CONFIG_XENO_OPT_NATIVE_MPS
        /* The nucleus will reschedule as needed when all the deletion
           hooks are done. */
@@ -640,11 +645,6 @@ int rt_task_delete(RT_TASK *task)
        if (err)
                goto unlock_and_exit;
 
-#if defined(CONFIG_XENO_OPT_NATIVE_MPS) && defined(CONFIG_XENO_FASTSYNCH)
-       xnheap_free(&xnsys_ppd_get(0)->sem_heap,
-                   task->msendq.fastlock);
-#endif
-
        /* Does not return if task is current. */
        xnpod_delete_thread(&task->thread_base);
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to