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

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 667195c..6af0659 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -106,7 +106,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 DEFINE_SEMAPHORE(registration_mutex);
 
@@ -3052,8 +3052,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