A patch for linuxthreads

H . J . Lu hjl@valinux.com
Mon Sep 4 10:48:00 GMT 2000


page_roundup is faster than roundup. Since `ps' is returned from
__getpagesize (), it should be ok.


-- 
H.J. Lu (hjl@gnu.org)
---
2000-09-04  H.J. Lu  <hjl@gnu.org>

	* attr.c (__pthread_attr_setguardsize): Use page_roundup
	instead of roundup to round up to the page size.

Index: attr.c
===================================================================
RCS file: /work/cvs/gnu/glibc/linuxthreads/attr.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 attr.c
--- attr.c	2000/08/16 00:55:46	1.1.1.2
+++ attr.c	2000/08/17 16:18:05
@@ -147,7 +147,7 @@ int __pthread_attr_setguardsize(pthread_
   size_t ps = __getpagesize ();
 
   /* First round up the guard size.  */
-  guardsize = roundup (guardsize, ps);
+  guardsize = page_roundup (guardsize, ps);
 
   /* The guard size must not be larger than the stack itself */
   if (guardsize >= attr->__stacksize) return EINVAL;


More information about the Libc-hacker mailing list