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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed May 25 12:38:36 2016 +0200

hal/generic: add backward wrappers for legacy cpu mask ops

---

 include/asm-generic/wrappers.h |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index 089e45a..b4b4291 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -807,4 +807,21 @@ proc_create(const char *name, mode_t mode, struct 
proc_dir_entry *parent,
 #endif /* < 2.6.25 */
 #endif /* < 3.10 */
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
+#define cpu_set(cpu, mask)             cpumask_set_cpu(cpu, &(mask))
+#define cpu_clear(cpu, mask)           cpumask_clear_cpu(cpu, &(mask))
+#define cpus_clear(mask)               cpumask_clear(&(mask))
+#define cpu_isset(cpu, mask)           cpumask_test_cpu(cpu, &(mask))
+#define cpus_and(dst, src1, src2)      cpumask_and(&(dst), &(src1), &(src2))
+#define cpus_equal(mask1, mask2)       cpumask_equal(&(mask1), &(mask2))
+#define cpus_empty(mask)               cpumask_empty(&(mask))
+#define cpu_test_and_set(cpu, mask)    cpumask_test_and_set_cpu(cpu, &(mask))
+#define first_cpu(mask)                        cpumask_first(&(mask))
+#define cpumask_of_cpu(mask)           (*cpumask_of(mask))
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
+#define user_msghdr msghdr
+#endif
+
 #endif /* _XENO_ASM_GENERIC_WRAPPERS_H */


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

Reply via email to