diff options
| author | Yabin Cui <yabinc@google.com> | 2015-04-16 18:35:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-16 18:35:43 +0000 |
| commit | 51e32b52a3d087aec0e80df93129d598221bf312 (patch) | |
| tree | 8c6121798d7efda991783418926789f0a421d9fc /include | |
| parent | bb643ccb5d6b1f9a7809e9def30a498b42bd9ed0 (diff) | |
| parent | a8ac32c7815569add9ed3d729864d3b9cdbb5fce (diff) | |
| download | core-51e32b52a3d087aec0e80df93129d598221bf312.tar.gz core-51e32b52a3d087aec0e80df93129d598221bf312.tar.bz2 core-51e32b52a3d087aec0e80df93129d598221bf312.zip | |
Merge "Move trace.h to stdatomic."
Diffstat (limited to 'include')
| -rw-r--r-- | include/cutils/trace.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/cutils/trace.h b/include/cutils/trace.h index 9d039e6dc..e4ed17983 100644 --- a/include/cutils/trace.h +++ b/include/cutils/trace.h @@ -18,6 +18,7 @@ #define _LIBS_CUTILS_TRACE_H #include <inttypes.h> +#include <stdatomic.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> @@ -25,7 +26,6 @@ #include <sys/types.h> #include <unistd.h> -#include <cutils/atomic.h> #include <cutils/compiler.h> __BEGIN_DECLS @@ -113,7 +113,7 @@ void atrace_set_tracing_enabled(bool enabled); * Nonzero indicates setup has completed. * Note: This does NOT indicate whether or not setup was successful. */ -extern volatile int32_t atrace_is_ready; +extern atomic_bool atrace_is_ready; /** * Set of ATRACE_TAG flags to trace for, initialized to ATRACE_TAG_NOT_READY. @@ -136,7 +136,7 @@ extern int atrace_marker_fd; #define ATRACE_INIT() atrace_init() static inline void atrace_init() { - if (CC_UNLIKELY(!android_atomic_acquire_load(&atrace_is_ready))) { + if (CC_UNLIKELY(!atomic_load_explicit(&atrace_is_ready, memory_order_acquire))) { atrace_setup(); } } |
