summaryrefslogtreecommitdiff
path: root/runtime/base/mutex-inl.h
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2014-11-06 10:49:16 -0800
committer Chih-Hung Hsieh <chh@google.com> 2014-11-06 10:49:16 -0800
commit729c1cfd39e859d6f5a24e1010959a382474592c (patch)
tree8b9dcf44888b60f19a07ff73af1d2b2ade4a3799 /runtime/base/mutex-inl.h
parent970a25ca627fe13ab381bc4c639868179a3c8f1f (diff)
Move include of system headers outside namesapce.
This happened to work with old system header files. But with newer glibc 2.15 header files, typedef names such as __u32 and __u64 are included into a namespace and could not be used in other system header files. BUG: 18275923 Change-Id: I7c61270d08a7b1c69cee55a6a23b00372f0f51c8
Diffstat (limited to 'runtime/base/mutex-inl.h')
-rw-r--r--runtime/base/mutex-inl.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/base/mutex-inl.h b/runtime/base/mutex-inl.h
index e066787bfd..0b13e312d3 100644
--- a/runtime/base/mutex-inl.h
+++ b/runtime/base/mutex-inl.h
@@ -26,16 +26,18 @@
#include "runtime.h"
#include "thread.h"
-namespace art {
-
-#define CHECK_MUTEX_CALL(call, args) CHECK_PTHREAD_CALL(call, args, name_)
-
#if ART_USE_FUTEXES
#include "linux/futex.h"
#include "sys/syscall.h"
#ifndef SYS_futex
#define SYS_futex __NR_futex
#endif
+#define CHECK_MUTEX_CALL(call, args) CHECK_PTHREAD_CALL(call, args, name_)
+#endif // ART_USE_FUTEXES
+
+namespace art {
+
+#if ART_USE_FUTEXES
static inline int futex(volatile int *uaddr, int op, int val, const struct timespec *timeout, volatile int *uaddr2, int val3) {
return syscall(SYS_futex, uaddr, op, val, timeout, uaddr2, val3);
}