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. --- sysdeps/generic/pt-attr-setstacksize.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sysdeps/generic/pt-attr-setstacksize.c') diff --git a/sysdeps/generic/pt-attr-setstacksize.c b/sysdeps/generic/pt-attr-setstacksize.c index c88f917..00d9675 100644 --- a/sysdeps/generic/pt-attr-setstacksize.c +++ b/sysdeps/generic/pt-attr-setstacksize.c @@ -26,11 +26,5 @@ pthread_attr_setstacksize (pthread_attr_t *attr, { attr->stacksize = stacksize; - /* The guard size cannot be larger than the stack itself, as - such, if the new stack size is smaller than the guard size, - we squash the guard size. */ - if (attr->guardsize > attr->stacksize) - attr->guardsize = attr->stacksize; - return 0; } -- cgit v1.2.3