1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

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.
This commit is contained in:
Carlos O'Donell
2014-11-29 01:21:58 -05:00
parent 97114a383f
commit 6d03458e40
2 changed files with 5 additions and 2 deletions

View File

@ -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);