summary refs log tree commit diff
path: root/nptl/nptl-init.c
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@redhat.com>2014-11-29 01:21:58 -0500
committerCarlos O'Donell <carlos@redhat.com>2014-11-29 01:21:58 -0500
commit6d03458e40bdb08d99d05bc7b298b00ad77d8e2b (patch)
tree3ab9cccfdc7feb32a39117794a0b4b77a2ce3d2c /nptl/nptl-init.c
parent97114a383fc167a64b0c85c9c5eaeb4f3ecd28f9 (diff)
downloadglibc-6d03458e40bdb08d99d05bc7b298b00ad77d8e2b.tar.gz
glibc-6d03458e40bdb08d99d05bc7b298b00ad77d8e2b.tar.xz
glibc-6d03458e40bdb08d99d05bc7b298b00ad77d8e2b.zip
Use ALIGN_UP in nptl/nptl-init.c
Replace bespoke code to align a value with
the ALIGN_UP macro to make it easier to read.
Diffstat (limited to 'nptl/nptl-init.c')
-rw-r--r--nptl/nptl-init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 831d762a70..dcb77c5cf6 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -35,7 +35,7 @@
 #include <smp.h>
 #include <lowlevellock.h>
 #include <kernel-features.h>
-
+#include <libc-internal.h>
 
 #ifndef TLS_MULTIPLE_THREADS_IN_TCB
 /* Pointer to the corresponding variable in libc.  */
@@ -451,7 +451,7 @@ __pthread_initialize_minimal_internal (void)
     limit.rlim_cur = minstack;
 
   /* Round the resource limit up to page size.  */
-  limit.rlim_cur = (limit.rlim_cur + pagesz - 1) & -pagesz;
+  limit.rlim_cur = ALIGN_UP (limit.rlim_cur, pagesz);
   lll_lock (__default_pthread_attr_lock, LLL_PRIVATE);
   __default_pthread_attr.stacksize = limit.rlim_cur;
   __default_pthread_attr.guardsize = GLRO (dl_pagesize);