Merge "bionic: Set PTHREAD_STACK_MIN for page agnostic targets" into main am: fe690875d5 am: 6ffba3ea18 am: 81fffa2108

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2719582

Change-Id: I9c7e97a3634f7dc8e0392e71da8189603eacc802
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Juan Yescas 2023-08-23 04:42:38 +00:00 committed by Automerger Merge Worker
commit 160ab18874

View file

@ -34,6 +34,7 @@
*/
#include <limits.h>
#include <bits/page_size.h>
#include <bits/pthread_types.h>
#include <sched.h>
#include <sys/cdefs.h>
@ -73,9 +74,14 @@ enum {
#define PTHREAD_BARRIER_SERIAL_THREAD (-1)
#endif
#if defined(__LP64__)
#if defined(PAGE_SIZE)
#define PTHREAD_STACK_MIN (4 * PAGE_SIZE)
#else
#define PTHREAD_STACK_MIN 65536
#endif
#else
#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
#endif