diff options
author | Dan Albert | 2015-03-23 18:12:59 -0500 |
---|---|---|
committer | Gerrit Code Review | 2015-03-23 18:13:00 -0500 |
commit | 89996c4b74c438bd426710ff52139893aa39514c (patch) | |
tree | 51a4096f704ddf24593eb22f38cb4ba072dd0ed6 | |
parent | ddccd24f446797cfc3455f309d55c54183b64b53 (diff) | |
parent | e308104390031da79237a1d00d387276f7edc003 (diff) | |
download | platform-system-core-89996c4b74c438bd426710ff52139893aa39514c.tar.gz platform-system-core-89996c4b74c438bd426710ff52139893aa39514c.tar.xz platform-system-core-89996c4b74c438bd426710ff52139893aa39514c.zip |
Merge "Undo mac fix to fix windows, fix mac differently."
-rw-r--r-- | libcutils/Android.mk | 2 | ||||
-rw-r--r-- | libcutils/threads.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libcutils/Android.mk b/libcutils/Android.mk index 876b89d32..2c5e351a2 100644 --- a/libcutils/Android.mk +++ b/libcutils/Android.mk | |||
@@ -68,7 +68,7 @@ endif | |||
68 | # ======================================================== | 68 | # ======================================================== |
69 | LOCAL_MODULE := libcutils | 69 | LOCAL_MODULE := libcutils |
70 | LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c | 70 | LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c |
71 | LOCAL_STATIC_LIBRARIES := liblog libbase | 71 | LOCAL_STATIC_LIBRARIES := liblog |
72 | ifneq ($(HOST_OS),windows) | 72 | ifneq ($(HOST_OS),windows) |
73 | LOCAL_CFLAGS += -Werror | 73 | LOCAL_CFLAGS += -Werror |
74 | endif | 74 | endif |
diff --git a/libcutils/threads.c b/libcutils/threads.c index cafeff73f..d90161951 100644 --- a/libcutils/threads.c +++ b/libcutils/threads.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include "AvailabilityMacros.h" // For MAC_OS_X_VERSION_MAX_ALLOWED | 23 | #include "AvailabilityMacros.h" // For MAC_OS_X_VERSION_MAX_ALLOWED |
24 | #include <sys/syscall.h> | 24 | #include <sys/syscall.h> |
25 | #include <sys/time.h> | 25 | #include <sys/time.h> |
26 | #include "base/logging.h" | ||
27 | #elif defined(__linux__) && !defined(__ANDROID__) | 26 | #elif defined(__linux__) && !defined(__ANDROID__) |
28 | #include <syscall.h> | 27 | #include <syscall.h> |
29 | #include <unistd.h> | 28 | #include <unistd.h> |
@@ -61,7 +60,10 @@ extern void thread_store_set( thread_store_t* store, | |||
61 | pid_t gettid() { | 60 | pid_t gettid() { |
62 | #if defined(__APPLE__) | 61 | #if defined(__APPLE__) |
63 | uint64_t owner; | 62 | uint64_t owner; |
64 | CHECK_PTHREAD_CALL(pthread_threadid_np, (NULL, &owner), __FUNCTION__); | 63 | int rc = pthread_threadid_np(NULL, &owner); |
64 | if (rc != 0) { | ||
65 | abort(); | ||
66 | } | ||
65 | return owner; | 67 | return owner; |
66 | #elif defined(__linux__) | 68 | #elif defined(__linux__) |
67 | return syscall(__NR_gettid); | 69 | return syscall(__NR_gettid); |