bionic: Set PTHREAD_STACK_MIN for page agnostic targets
Page size agnostic targets will have a pthread stack equals to 65536. Page size agnostic targets will only support ARM64 arch. For not agnostic builds, PTHREAD_STACK_MIN will remain the same. Bug: 296907948 Test: source build/envsetup.sh lunch aosp_cf_arm64_phone_pgagnostic m source build/envsetup.sh aosp_cf_x86_64_phone-userdebug m Change-Id: Ifcc04a9d924501f686cdfec34428d3f29154fdf0
This commit is contained in:
parent
9fd0f4b90d
commit
8d3866bacb
1 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <bits/page_size.h>
|
||||||
#include <bits/pthread_types.h>
|
#include <bits/pthread_types.h>
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
@ -73,9 +74,14 @@ enum {
|
||||||
#define PTHREAD_BARRIER_SERIAL_THREAD (-1)
|
#define PTHREAD_BARRIER_SERIAL_THREAD (-1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(__LP64__)
|
#if defined(__LP64__)
|
||||||
|
#if defined(PAGE_SIZE)
|
||||||
#define PTHREAD_STACK_MIN (4 * PAGE_SIZE)
|
#define PTHREAD_STACK_MIN (4 * PAGE_SIZE)
|
||||||
#else
|
#else
|
||||||
|
#define PTHREAD_STACK_MIN 65536
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
|
#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue