summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlex Ray <aray@google.com>2012-11-30 19:37:53 -0800
committerAlex Ray <aray@google.com>2012-11-30 19:40:58 -0800
commit448f76a1c4eb78661b5ac68013e8a2348c92df63 (patch)
tree64ef75a0ac1e551e807caac4a2ff2cf1efbf3ce6 /include
parenteb35fdff9260419defa2cfdfa54dde0ebd911854 (diff)
downloadsystem_core-448f76a1c4eb78661b5ac68013e8a2348c92df63.zip
system_core-448f76a1c4eb78661b5ac68013e8a2348c92df63.tar.gz
system_core-448f76a1c4eb78661b5ac68013e8a2348c92df63.tar.bz2
cutils: trace: use ANDROID_SMP to switch atomics
With inline atomics, trace functions have no non-inline function calls in the fast (tracing off) path. To enable this, ANDROID_SMP must be defined for the project. Otherwise, normal (non-inline) atomics are used. Change-Id: Id1f75bdf7db2f5d319a389ad411f55073d78c48c
Diffstat (limited to 'include')
-rw-r--r--include/cutils/trace.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/cutils/trace.h b/include/cutils/trace.h
index 3869662..1db3903 100644
--- a/include/cutils/trace.h
+++ b/include/cutils/trace.h
@@ -21,9 +21,14 @@
#include <sys/types.h>
#include <stdint.h>
#include <unistd.h>
-#include <cutils/atomic.h>
#include <cutils/compiler.h>
+#ifdef ANDROID_SMP
+#include <cutils/atomic-inline.h>
+#else
+#include <cutils/atomic.h>
+#endif
+
__BEGIN_DECLS
/**