From 19657e8b846a7426424f261c355bc54a68b3021b Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 2 May 2014 12:30:16 +0200 Subject: Fix guardsize semantic POSIX says guardsize is in addition to stacksize, not included. * pthread/pt-create.c (__pthread_create_internal): Use setup->guardsize + setup->stacksize as stack allocation size. Do not truncate guardsize to stacksize. * pthread/pt-internal.h (guardsize): Remove comment. * sysdeps/generic/pt-attr-setstacksize.c (pthread_attr_setstacksize): Do not truncate guardsize to stacksize. --- pthread/pt-internal.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'pthread/pt-internal.h') diff --git a/pthread/pt-internal.h b/pthread/pt-internal.h index eca63a1..79db55c 100644 --- a/pthread/pt-internal.h +++ b/pthread/pt-internal.h @@ -94,11 +94,7 @@ struct __pthread /* Thread stack. */ void *stackaddr; size_t stacksize; - size_t guardsize; /* Included in STACKSIZE (i.e. total - stack memory is STACKSIZE, not - STACKSIZE + GUARDSIZE). */ - /* FIXME: standard says that guardsize is in - addition to stacksize. */ + size_t guardsize; int stack; /* Nonzero if the stack was allocated. */ /* Exit status. */ -- cgit v1.2.3