mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 06:12:27 +00:00
Remove old stack code and improve dirstream
This commit is contained in:
parent
74caabb823
commit
dc6c67256f
61 changed files with 463 additions and 595 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue