aboutsummaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
index 67b04f8cb..54bc27d5b 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -60,6 +60,15 @@
60 60
61#define UNUSED_PARAM __attribute__ ((__unused__)) 61#define UNUSED_PARAM __attribute__ ((__unused__))
62#define NORETURN __attribute__ ((__noreturn__)) 62#define NORETURN __attribute__ ((__noreturn__))
63/* "The malloc attribute is used to tell the compiler that a function
64 * may be treated as if any non-NULL pointer it returns cannot alias
65 * any other pointer valid when the function returns. This will often
66 * improve optimization. Standard functions with this property include
67 * malloc and calloc. realloc-like functions have this property as long
68 * as the old pointer is never referred to (including comparing it
69 * to the new pointer) after the function returns a non-NULL value."
70 */
71#define RETURNS_MALLOC __attribute__ ((malloc))
63#define PACKED __attribute__ ((__packed__)) 72#define PACKED __attribute__ ((__packed__))
64#define ALIGNED(m) __attribute__ ((__aligned__(m))) 73#define ALIGNED(m) __attribute__ ((__aligned__(m)))
65 74