Remove old stack code and improve dirstream

This commit is contained in:
Justine Tunney 2023-08-16 07:54:40 -07:00
parent 74caabb823
commit dc6c67256f
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
61 changed files with 463 additions and 595 deletions

View file

@ -3,6 +3,20 @@
#if !(__ASSEMBLER__ + __LINKER__ + 0)
#ifdef _COSMO_SOURCE
/**
* Returns preferred size and alignment of thread stack.
*
* This will always be equal to `PTHREAD_STACK_MIN`.
*/
#define GetStackSize() 262144
/**
* Returns preferred stack guard size.
*
* This is the max cpu page size of supported architectures.
*/
#define GetGuardSize() 16384
/**
* Tunes APE stack maximum size.
*
@ -80,20 +94,6 @@ extern char ape_stack_prot[] __attribute__((__weak__));
extern char ape_stack_memsz[] __attribute__((__weak__));
extern char ape_stack_align[] __attribute__((__weak__));
/**
* Returns preferred size and alignment of thread stack.
*
* This will always be equal to `PTHREAD_STACK_MIN`.
*/
#define GetStackSize() 262144
/**
* Returns preferred stack guard size.
*
* This is the max cpu page size of supported architectures.
*/
#define GetGuardSize() 16384
/**
* Returns address of bottom of stack.
*
@ -107,6 +107,8 @@ extern char ape_stack_align[] __attribute__((__weak__));
#define GetStackAddr() \
(((intptr_t)__builtin_frame_address(0) - 1) & -GetStackSize())
#define GetStaticStackSize() ((uintptr_t)ape_stack_memsz)
#ifdef __x86_64__
/**
* Returns preferred bottom address of stack.