From 7c709f2d4f9872d1b445f760b0e68da89e256b9e Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 2 Feb 2018 20:08:55 +0000 Subject: store pthread stack guard sizes for pthread_getattr_np --- src/thread/pthread_create.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/thread/pthread_create.c') diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c index 34cd9936..439ee363 100644 --- a/src/thread/pthread_create.c +++ b/src/thread/pthread_create.c @@ -232,8 +232,8 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att memset(stack, 0, need); } else { size = ROUND(need); - guard = 0; } + guard = 0; } else { guard = ROUND(attr._a_guardsize); size = guard + ROUND(attr._a_stacksize @@ -265,6 +265,7 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att new->map_size = size; new->stack = stack; new->stack_size = stack - stack_limit; + new->guard_size = guard; new->start = entry; new->start_arg = arg; new->self = new; -- cgit v1.2.1