mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Create variables for page size
This commit is contained in:
parent
23dfb79d33
commit
567d8fe32d
34 changed files with 137 additions and 101 deletions
|
@ -144,7 +144,7 @@ static int FixupCustomStackOnOpenbsd(pthread_attr_t *attr) {
|
|||
size_t n;
|
||||
uintptr_t x, y;
|
||||
int e, rc, pagesz;
|
||||
pagesz = getpagesize();
|
||||
pagesz = __pagesize;
|
||||
n = attr->__stacksize;
|
||||
x = (uintptr_t)attr->__stackaddr;
|
||||
y = ROUNDUP(x, pagesz);
|
||||
|
@ -210,7 +210,7 @@ static errno_t pthread_create_impl(pthread_t *thread,
|
|||
}
|
||||
} else {
|
||||
// cosmo is managing the stack
|
||||
int pagesize = getpagesize();
|
||||
int pagesize = __pagesize;
|
||||
pt->pt_attr.__guardsize = ROUNDUP(pt->pt_attr.__guardsize, pagesize);
|
||||
pt->pt_attr.__stacksize = pt->pt_attr.__stacksize;
|
||||
if (pt->pt_attr.__guardsize + pagesize > pt->pt_attr.__stacksize) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue