[v3,26/29] Linux: Optimize getpagesize using <sys/pagesize.h>
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
fail
|
Test failed
|
Commit Message
---
sysdeps/unix/sysv/linux/getpagesize.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -17,6 +17,7 @@
#include <assert.h>
#include <unistd.h>
+#include <sys/pagesize.h>
#include <sys/param.h>
#include <ldsodefs.h>
@@ -25,8 +26,12 @@
int
__getpagesize (void)
{
+#if PAGE_SIZE_MIN == PAGE_SIZE_MAX
+ return PAGE_SIZE_MIN;
+#else
assert (GLRO(dl_pagesize) != 0);
return GLRO(dl_pagesize);
+#endif
}
libc_hidden_def (__getpagesize)
weak_alias (__getpagesize, getpagesize)