store pthread stack guard sizes for pthread_getattr_np
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index 34cd993..439ee36 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -232,8 +232,8 @@
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 @@
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;