__check_max_thread_id(): add the workaround to the error message.
Change-Id: Ibaf848f90e04c2df85b0d2e82a133cd20c718bf9
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp
index 939e4e1..0665725 100644
--- a/libc/bionic/libc_init_common.cpp
+++ b/libc/bionic/libc_init_common.cpp
@@ -78,8 +78,10 @@
#if !defined(__LP64__)
static void __check_max_thread_id() {
if (gettid() > 65535) {
- async_safe_fatal("Limited by the size of pthread_mutex_t, 32 bit bionic libc only accepts "
- "pid <= 65535, but current pid is %d", gettid());
+ async_safe_fatal("32-bit pthread_mutex_t only supports pids <= 65535; "
+ "current pid %d; "
+ "`echo 65535 > /proc/sys/kernel/pid_max` as root",
+ gettid());
}
}
#endif