Module: xenomai-3
Branch: next
Commit: 3b9b126b7968bd74187bd61712e0317c0c04089e
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=3b9b126b7968bd74187bd61712e0317c0c04089e

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Nov  2 20:45:10 2015 +0100

cobalt/kernel: fixup for v3.19+ (user_msghdr)

---

 kernel/cobalt/include/asm-generic/xenomai/wrappers.h |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h 
b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
index c9e6e87..7b191e4 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
@@ -38,10 +38,17 @@
  *   symbol, so that obsolete wrappers can be spotted.
  */
 
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0)
 #define in_ia32_syscall() (current_thread_info()->status & TS_COMPAT)
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+#define cobalt_get_restart_block(p)    (&task_thread_info(p)->restart_block)
+#else
+#define cobalt_get_restart_block(p)    (&(p)->restart_block)
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
 #define user_msghdr msghdr
 #endif
@@ -137,10 +144,4 @@ devm_hwmon_device_register_with_groups(struct device *dev, 
const char *name,
 #error "Xenomai/cobalt requires Linux kernel 3.10 or above"
 #endif /* < 3.10 */
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
-#define cobalt_get_restart_block(p)    (&task_thread_info(p)->restart_block)
-#else
-#define cobalt_get_restart_block(p)    (&(p)->restart_block)
-#endif
-
 #endif /* _COBALT_ASM_GENERIC_WRAPPERS_H */


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

Reply via email to