Loading base/logging.cpp +7 −1 Original line number Original line Diff line number Diff line Loading @@ -68,7 +68,13 @@ #include <windows.h> #include <windows.h> #endif #endif static pid_t GetThreadId() { #if defined(_WIN32) typedef uint32_t thread_id; #else typedef pid_t thread_id; #endif static thread_id GetThreadId() { #if defined(__BIONIC__) #if defined(__BIONIC__) return gettid(); return gettid(); #elif defined(__APPLE__) #elif defined(__APPLE__) Loading include/utils/ThreadDefs.h +4 −0 Original line number Original line Diff line number Diff line Loading @@ -29,7 +29,11 @@ extern "C" { extern "C" { #endif #endif #ifdef _WIN32 typedef uint32_t android_thread_id_t; #else typedef void* android_thread_id_t; typedef void* android_thread_id_t; #endif typedef int (*android_thread_func_t)(void*); typedef int (*android_thread_func_t)(void*); Loading liblog/fake_log_device.c +4 −0 Original line number Original line Diff line number Diff line Loading @@ -367,7 +367,11 @@ static void showLog(LogState *state, char prefixBuf[128], suffixBuf[128]; char prefixBuf[128], suffixBuf[128]; char priChar; char priChar; time_t when; time_t when; #if !defined(_WIN32) pid_t pid, tid; pid_t pid, tid; #else uint32_t pid, tid; #endif TRACE("LOG %d: %s %s", logPrio, tag, msg); TRACE("LOG %d: %s %s", logPrio, tag, msg); Loading libutils/Android.mk +2 −2 Original line number Original line Diff line number Diff line Loading @@ -22,7 +22,6 @@ commonSources:= \ Log.cpp \ Log.cpp \ NativeHandle.cpp \ NativeHandle.cpp \ Printer.cpp \ Printer.cpp \ ProcessCallStack.cpp \ PropertyMap.cpp \ PropertyMap.cpp \ RefBase.cpp \ RefBase.cpp \ SharedBuffer.cpp \ SharedBuffer.cpp \ Loading @@ -44,7 +43,7 @@ host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -Werror # ===================================================== # ===================================================== include $(CLEAR_VARS) include $(CLEAR_VARS) LOCAL_SRC_FILES:= $(commonSources) LOCAL_SRC_FILES:= $(commonSources) LOCAL_SRC_FILES_linux := Looper.cpp LOCAL_SRC_FILES_linux := Looper.cpp ProcessCallStack.cpp LOCAL_CFLAGS_darwin := -Wno-unused-parameter LOCAL_CFLAGS_darwin := -Wno-unused-parameter LOCAL_MODULE:= libutils LOCAL_MODULE:= libutils LOCAL_STATIC_LIBRARIES := liblog LOCAL_STATIC_LIBRARIES := liblog Loading @@ -67,6 +66,7 @@ LOCAL_SRC_FILES:= \ $(commonSources) \ $(commonSources) \ BlobCache.cpp \ BlobCache.cpp \ Looper.cpp \ Looper.cpp \ ProcessCallStack.cpp \ Trace.cpp Trace.cpp ifeq ($(TARGET_ARCH),mips) ifeq ($(TARGET_ARCH),mips) Loading libutils/ProcessCallStack.cpp +0 −2 Original line number Original line Diff line number Diff line Loading @@ -146,7 +146,6 @@ void ProcessCallStack::update() { clear(); clear(); // Get current time. // Get current time. #ifndef USE_MINGW { { time_t t = time(NULL); time_t t = time(NULL); struct tm tm; struct tm tm; Loading Loading @@ -199,7 +198,6 @@ void ProcessCallStack::update() { ALOGE("%s: Failed to readdir from %s: %s", ALOGE("%s: Failed to readdir from %s: %s", __FUNCTION__, PATH_SELF_TASK, strerror(code)); __FUNCTION__, PATH_SELF_TASK, strerror(code)); } } #endif closedir(dp); closedir(dp); } } Loading Loading
base/logging.cpp +7 −1 Original line number Original line Diff line number Diff line Loading @@ -68,7 +68,13 @@ #include <windows.h> #include <windows.h> #endif #endif static pid_t GetThreadId() { #if defined(_WIN32) typedef uint32_t thread_id; #else typedef pid_t thread_id; #endif static thread_id GetThreadId() { #if defined(__BIONIC__) #if defined(__BIONIC__) return gettid(); return gettid(); #elif defined(__APPLE__) #elif defined(__APPLE__) Loading
include/utils/ThreadDefs.h +4 −0 Original line number Original line Diff line number Diff line Loading @@ -29,7 +29,11 @@ extern "C" { extern "C" { #endif #endif #ifdef _WIN32 typedef uint32_t android_thread_id_t; #else typedef void* android_thread_id_t; typedef void* android_thread_id_t; #endif typedef int (*android_thread_func_t)(void*); typedef int (*android_thread_func_t)(void*); Loading
liblog/fake_log_device.c +4 −0 Original line number Original line Diff line number Diff line Loading @@ -367,7 +367,11 @@ static void showLog(LogState *state, char prefixBuf[128], suffixBuf[128]; char prefixBuf[128], suffixBuf[128]; char priChar; char priChar; time_t when; time_t when; #if !defined(_WIN32) pid_t pid, tid; pid_t pid, tid; #else uint32_t pid, tid; #endif TRACE("LOG %d: %s %s", logPrio, tag, msg); TRACE("LOG %d: %s %s", logPrio, tag, msg); Loading
libutils/Android.mk +2 −2 Original line number Original line Diff line number Diff line Loading @@ -22,7 +22,6 @@ commonSources:= \ Log.cpp \ Log.cpp \ NativeHandle.cpp \ NativeHandle.cpp \ Printer.cpp \ Printer.cpp \ ProcessCallStack.cpp \ PropertyMap.cpp \ PropertyMap.cpp \ RefBase.cpp \ RefBase.cpp \ SharedBuffer.cpp \ SharedBuffer.cpp \ Loading @@ -44,7 +43,7 @@ host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -Werror # ===================================================== # ===================================================== include $(CLEAR_VARS) include $(CLEAR_VARS) LOCAL_SRC_FILES:= $(commonSources) LOCAL_SRC_FILES:= $(commonSources) LOCAL_SRC_FILES_linux := Looper.cpp LOCAL_SRC_FILES_linux := Looper.cpp ProcessCallStack.cpp LOCAL_CFLAGS_darwin := -Wno-unused-parameter LOCAL_CFLAGS_darwin := -Wno-unused-parameter LOCAL_MODULE:= libutils LOCAL_MODULE:= libutils LOCAL_STATIC_LIBRARIES := liblog LOCAL_STATIC_LIBRARIES := liblog Loading @@ -67,6 +66,7 @@ LOCAL_SRC_FILES:= \ $(commonSources) \ $(commonSources) \ BlobCache.cpp \ BlobCache.cpp \ Looper.cpp \ Looper.cpp \ ProcessCallStack.cpp \ Trace.cpp Trace.cpp ifeq ($(TARGET_ARCH),mips) ifeq ($(TARGET_ARCH),mips) Loading
libutils/ProcessCallStack.cpp +0 −2 Original line number Original line Diff line number Diff line Loading @@ -146,7 +146,6 @@ void ProcessCallStack::update() { clear(); clear(); // Get current time. // Get current time. #ifndef USE_MINGW { { time_t t = time(NULL); time_t t = time(NULL); struct tm tm; struct tm tm; Loading Loading @@ -199,7 +198,6 @@ void ProcessCallStack::update() { ALOGE("%s: Failed to readdir from %s: %s", ALOGE("%s: Failed to readdir from %s: %s", __FUNCTION__, PATH_SELF_TASK, strerror(code)); __FUNCTION__, PATH_SELF_TASK, strerror(code)); } } #endif closedir(dp); closedir(dp); } } Loading