summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/compiler.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-17 18:35:37 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-17 18:35:37 +0000
commit24acf10752079d502696d57e20c2078b4e2ea801 (patch)
tree1701d3d2c3f6c456a04442336d5fa406bf553b55 /nuttx/include/nuttx/compiler.h
parentb468f0fc17590b77076802afd66e23cb78373943 (diff)
downloadnuttx-24acf10752079d502696d57e20c2078b4e2ea801.tar.gz
nuttx-24acf10752079d502696d57e20c2078b4e2ea801.tar.bz2
nuttx-24acf10752079d502696d57e20c2078b4e2ea801.zip
Resync new repository with old repo r5166
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5154 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/nuttx/compiler.h')
-rw-r--r--nuttx/include/nuttx/compiler.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h
index 733d58eec..1e0af4382 100644
--- a/nuttx/include/nuttx/compiler.h
+++ b/nuttx/include/nuttx/compiler.h
@@ -1,7 +1,7 @@
/****************************************************************************
* include/nuttx/compiler.h
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -92,6 +92,14 @@
# define reentrant_function
# define naked_function
+/* The inline_function attribute informs GCC that the function should always
+ * be inlined, regardless of the level of optimization. The noinline_function
+ * indicates that the function should never be inlined.
+ */
+
+# define inline_function __attribute__ ((always_inline))
+# define noinline_function __attribute__ ((noinline))
+
/* GCC has does not use storage classes to qualify addressing */
# define FAR
@@ -224,10 +232,15 @@
# define noreturn_function
# define packed_struct
-/* SDCC does support "naked" function s*/
+/* SDCC does support "naked" functions */
# define naked_function __naked
+/* SDCC does not support forced inlining. */
+
+# define inline_function
+# define noinline_function
+
/* The reentrant attribute informs SDCC that the function
* must be reentrant. In this case, SDCC will store input
* arguments on the stack to support reentrancy.
@@ -320,11 +333,13 @@
# define weak_function
# define weak_const_function
-/* The Zilog compiler does not support the noreturn, packed, or naked attributes */
+/* The Zilog compiler does not support the noreturn, packed, naked attributes */
# define noreturn_function
# define packed_struct
# define naked_function
+# define inline_function
+# define noinline_function
/* The Zilog compiler does not support the reentrant attribute */
@@ -406,7 +421,8 @@
# define packed_struct
# define reentrant_function
# define naked_function
-
+# define inline_function
+# define noinline_function
# define FAR
# define NEAR