mirror of git://sourceware.org/git/glibc.git
(__pthread_attr_setguardsize): Don't round guardsize here.
This commit is contained in:
parent
ac98d05393
commit
56c511b54b
|
|
@ -145,11 +145,6 @@ int pthread_attr_getscope(const pthread_attr_t *attr, int *scope)
|
||||||
|
|
||||||
int __pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize)
|
int __pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize)
|
||||||
{
|
{
|
||||||
size_t ps = __getpagesize ();
|
|
||||||
|
|
||||||
/* First round up the guard size. */
|
|
||||||
guardsize = page_roundup (guardsize, ps);
|
|
||||||
|
|
||||||
/* The guard size must not be larger than the stack itself */
|
/* The guard size must not be larger than the stack itself */
|
||||||
if (guardsize >= attr->__stacksize) return EINVAL;
|
if (guardsize >= attr->__stacksize) return EINVAL;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue