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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Nov  8 09:31:31 2011 +0100

hal: introduce wrapper for missing DEFINE_SEMAPHORE()

---

 include/asm-generic/wrappers.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index ef34239..b3f711d 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -74,6 +74,11 @@ static inline struct task_struct 
*wrap_find_task_by_pid(pid_t nr)
 #define DECLARE_IOCTL_HANDLER(name, filp, cmd, arg)            \
        long name(struct file *filp, unsigned int cmd, unsigned long arg)
 
+#ifndef DEFINE_SEMAPHORE
+/* Legacy DECLARE_MUTEX vanished in 2.6.37 */
+#define DEFINE_SEMAPHORE(sem) DECLARE_MUTEX(sem)
+#endif
+
 #include <linux/mm.h>
 #ifndef pgprot_noncached
 #define pgprot_noncached(p) (p)


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

Reply via email to