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

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Wed Jun 29 09:40:25 2011 +0200

native: Do not acquire non-existent MPS fastlock

Fix a build warning at this chance as well.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

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

diff --git a/ksrc/skins/native/task.c b/ksrc/skins/native/task.c
index bcce4c7..908ab4d 100644
--- a/ksrc/skins/native/task.c
+++ b/ksrc/skins/native/task.c
@@ -256,7 +256,9 @@ void __native_task_pkg_cleanup(void)
 int rt_task_create(RT_TASK *task,
                   const char *name, int stksize, int prio, int mode)
 {
+#if defined(CONFIG_XENO_OPT_NATIVE_MPS) && defined(CONFIG_XENO_FASTSYNCH)
        xnarch_atomic_t *fastlock = NULL;
+#endif
        union xnsched_policy_param param;
        struct xnthread_init_attr attr;
        int err = 0, cpumask, cpu;
@@ -336,8 +338,11 @@ int rt_task_create(RT_TASK *task,
                xnheap_free(&xnsys_ppd_get(0)->sem_heap, fastlock);
 #endif
                xnpod_delete_thread(&task->thread_base);
-       } else
+       }
+#if defined(CONFIG_XENO_OPT_NATIVE_MPS) && defined(CONFIG_XENO_FASTSYNCH)
+       else
                xnsynch_fast_acquire(fastlock, 
xnthread_handle(&task->thread_base));
+#endif
 
        return err;
 }


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

Reply via email to