Change the name of the libc logging header. am: be92dfd38f am: 7604d1f20d
am: 3d3237a80a

Change-Id: Icbd5933d3186ae70d2f60dfb9a7c296370bd7f2d
diff --git a/Android.bp b/Android.bp
index 38ddce0..f59a653 100644
--- a/Android.bp
+++ b/Android.bp
@@ -136,7 +136,7 @@
 
     defaults: ["jemalloc_defaults"],
 
-    cflags: ["-include bionic/libc/private/libc_logging.h"],
+    cflags: ["-include bionic/libc/async_safe/include/async_safe/log.h"],
 
     srcs: lib_src_files,
 }
@@ -151,7 +151,7 @@
 
     cflags: [
         "-DJEMALLOC_JET",
-        "-include android/include/libc_logging.h",
+        "-include android/include/log.h",
     ],
 
     srcs: lib_src_files,
@@ -181,7 +181,7 @@
 
     cflags: [
         "-DJEMALLOC_UNIT_TEST",
-        "-include android/include/libc_logging.h",
+        "-include android/include/log.h",
     ],
 
     local_include_dirs: [
@@ -251,7 +251,7 @@
 
     cflags: common_cflags + [
         "-DJEMALLOC_UNIT_TEST",
-        "-include android/include/libc_logging.h",
+        "-include android/include/log.h",
     ],
 
     local_include_dirs: common_c_local_includes + [
@@ -278,7 +278,7 @@
 
     cflags: [
         "-DJEMALLOC_INTEGRATION_TEST",
-        "-include android/include/libc_logging.h",
+        "-include android/include/log.h",
     ],
 
     local_include_dirs: [
@@ -319,7 +319,7 @@
 
     cflags: common_cflags + [
         "-DJEMALLOC_INTEGRATION_TEST",
-        "-include android/include/libc_logging.h",
+        "-include android/include/log.h",
     ],
 
     local_include_dirs: common_c_local_includes + [
diff --git a/android/include/libc_logging.h b/android/include/log.h
similarity index 92%
rename from android/include/libc_logging.h
rename to android/include/log.h
index 19c2cfe..01470ae 100644
--- a/android/include/libc_logging.h
+++ b/android/include/log.h
@@ -26,10 +26,10 @@
  * SUCH DAMAGE.
  */
 
-#ifndef _JEMALLOC_LIBC_LOGGING_H
-#define _JEMALLOC_LIBC_LOGGING_H
+#ifndef _JEMALLOC_LIBC_LOG_LOG_H
+#define _JEMALLOC_LIBC_LOG_LOG_H
 
 /* Convert this to an abort for jemalloc tests. */
-#define __libc_fatal(format, ...) abort()
+#define async_safe_fatal(format, ...) abort()
 
 #endif  /* _JEMALLOC_LIBC_LOGGING_H */
diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h
index 1ab91ea..0792951 100644
--- a/include/jemalloc/internal/arena.h
+++ b/include/jemalloc/internal/arena.h
@@ -1439,7 +1439,7 @@
 #if defined(__ANDROID__)
 		/* Verify the ptr is actually in the chunk. */
 		if (unlikely(pageind < map_bias || pageind >= chunk_npages)) {
-		    __libc_fatal("Invalid address %p passed to free: invalid page index", ptr);
+		    async_safe_fatal("Invalid address %p passed to free: invalid page index", ptr);
 		}
 #endif
 		mapbits = arena_mapbits_get(chunk, pageind);
@@ -1447,7 +1447,7 @@
 #if defined(__ANDROID__)
 		/* Verify the ptr has been allocated. */
 		if (unlikely((mapbits & CHUNK_MAP_ALLOCATED) == 0)) {
-		    __libc_fatal("Invalid address %p passed to free: value not allocated", ptr);
+		    async_safe_fatal("Invalid address %p passed to free: value not allocated", ptr);
 		}
 #endif
 		if (likely((mapbits & CHUNK_MAP_LARGE) == 0)) {