aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/attr.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-29 18:41:02 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-29 18:41:02 +0000
commitddbf7fef451eeb417ea28ca114f8f12c58dd5ca8 (patch)
tree4dbe0d974d84993dd580f97744121ae965ca4e2e /linuxthreads/attr.c
parentef5742267ce858e059ee27033014c24f009bb326 (diff)
downloadglibc-ddbf7fef451eeb417ea28ca114f8f12c58dd5ca8.zip
glibc-ddbf7fef451eeb417ea28ca114f8f12c58dd5ca8.tar.gz
glibc-ddbf7fef451eeb417ea28ca114f8f12c58dd5ca8.tar.bz2
Update.
1998-07-29 Mark Kettenis <kettenis@phys.uva.nl> * sysdeps/mach/hurd/dl-sysdep.c (__lseek): New function. (__getpid): New function. (abort): New function. * nis/nis_cache2_xdr.c: Removed.
Diffstat (limited to 'linuxthreads/attr.c')
-rw-r--r--linuxthreads/attr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/linuxthreads/attr.c b/linuxthreads/attr.c
index 7a099857..3a19ddc 100644
--- a/linuxthreads/attr.c
+++ b/linuxthreads/attr.c
@@ -146,10 +146,8 @@ int __pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize)
/* First round up the guard size. */
guardsize = roundup (guardsize, ps);
- /* The current implementation of LinuxThreads allocates 2MB stack space
- for each thread. So the maximum guardsize is 2MB - pagesize. */
- if (guardsize >= STACK_SIZE - ps)
- return EINVAL;
+ /* The guard size must not be larger than the stack itself */
+ if (guardsize >= attr->stacksize) return EINVAL;
attr->guardsize = guardsize;