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

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

rtdm: prefer sema_init() to init legacy semaphore (other syntax in flux)

---

 ksrc/skins/rtdm/device.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ksrc/skins/rtdm/device.c b/ksrc/skins/rtdm/device.c
index b7580d7..c3fae19 100644
--- a/ksrc/skins/rtdm/device.c
+++ b/ksrc/skins/rtdm/device.c
@@ -61,7 +61,7 @@ static int proto_hashkey_mask;
 int rtdm_apc;
 EXPORT_SYMBOL_GPL(rtdm_apc);
 
-DEFINE_SEMAPHORE(nrt_dev_lock);
+struct semaphore nrt_dev_lock;
 DEFINE_XNLOCK(rt_dev_lock);
 
 #ifndef MODULE
@@ -458,6 +458,8 @@ int __init rtdm_dev_init(void)
 {
        int err, i;
 
+       sema_init(&nrt_dev_lock, 1);
+
        rtdm_apc = rthal_apc_alloc("deferred RTDM close", rtdm_apc_handler,
                                   NULL);
        if (rtdm_apc < 0)


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

Reply via email to