Module: xenomai-rpm
Branch: for-upstream
Commit: 89f67c553cf4b6b5888a5a1cf802f906cee6c98a
URL:    
http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=89f67c553cf4b6b5888a5a1cf802f906cee6c98a

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Apr  7 16:23:08 2011 +0200

nucleus/shadow: prefer sema_init() to init legacy semaphore (other syntax in 
flux)

---

 ksrc/nucleus/shadow.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index d8d7116..0fea962 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -100,7 +100,7 @@ static struct task_struct 
*switch_lock_owner[XNARCH_NR_CPUS];
 
 static int nucleus_muxid = -1;
 
-static DEFINE_SEMAPHORE(completion_mutex);
+static struct semaphore completion_mutex;
 
 static inline struct task_struct *get_switch_lock_owner(void)
 {
@@ -2966,8 +2966,7 @@ int xnshadow_mount(void)
        unsigned i, size;
        int cpu, ret;
 
-       nucleus_muxid = -1;
-
+       sema_init(&completion_mutex, 1);
        nkthrptd = rthal_alloc_ptdkey();
        nkerrptd = rthal_alloc_ptdkey();
 


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

Reply via email to