Make sysconf(_SC_PAGESIZE) return the value from getpagesize(3).

That avoids a syscall - getpagesize(3) gets the value from the ELF
aux strings.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D17989
This commit is contained in:
Edward Tomasz Napierala 2018-11-19 18:23:17 +00:00
parent 00bf4d2515
commit 3a9cdc5132

View file

@ -291,10 +291,7 @@ do_NAME_MAX:
mib[1] = CTL_P1003_1B_MQ_OPEN_MAX;
goto yesno;
case _SC_PAGESIZE:
defaultresult = getpagesize();
mib[0] = CTL_P1003_1B;
mib[1] = CTL_P1003_1B_PAGESIZE;
goto yesno;
return (getpagesize());
case _SC_RTSIG_MAX:
mib[0] = CTL_P1003_1B;
mib[1] = CTL_P1003_1B_RTSIG_MAX;