]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Merge LinuxKPI changes from DragonflyBSD:
authorhselasky <hselasky@FreeBSD.org>
Mon, 19 Oct 2015 12:08:06 +0000 (12:08 +0000)
committerhselasky <hselasky@FreeBSD.org>
Mon, 19 Oct 2015 12:08:06 +0000 (12:08 +0000)
- Map more Linux compiler related defines to FreeBSD ones.

Sponsored by: Mellanox Technologies

sys/ofed/include/linux/compiler.h
sys/ofed/include/linux/types.h

index 9b1a5ad47d6ef0b6e26932ed730562397678bb86..263b281d017dcd2e9a9ccec00d0624c9c15a0617 100644 (file)
@@ -2,7 +2,8 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
- * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
+ * Copyright (c) 2013-2015 Mellanox Technologies, Ltd.
+ * Copyright (c) 2015 François Tigeot
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 #define typeof(x)                      __typeof(x)
 
 #define        uninitialized_var(x)            x = x
+#define        __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define        __always_unused                 __unused
+#define        __must_check                    __result_use_check
+
+#define        __printf(a,b)                   __printflike(a,b)
+
+#define        barrier()                       __asm__ __volatile__("": : :"memory")
 
 #endif /* _LINUX_COMPILER_H_ */
index 9fff0ec919f9df2b161312683ac40b785ea5539f..b5def55832503d6c7c41ec2bc25d8a1ba0dadf9d 100644 (file)
@@ -36,8 +36,6 @@
 #include <linux/compiler.h>
 #include <asm/types.h>
 
-#define        __read_mostly __attribute__((__section__(".data.read_mostly")))
-
 #ifndef __bitwise__
 #ifdef __CHECKER__
 #define __bitwise__ __attribute__((bitwise))