Author: trasz
Date: Mon Nov 19 18:23:17 2018
New Revision: 340641
URL: https://svnweb.freebsd.org/changeset/base/340641

Log:
  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

Modified:
  head/lib/libc/gen/sysconf.c

Modified: head/lib/libc/gen/sysconf.c
==============================================================================
--- head/lib/libc/gen/sysconf.c Mon Nov 19 18:12:39 2018        (r340640)
+++ head/lib/libc/gen/sysconf.c Mon Nov 19 18:23:17 2018        (r340641)
@@ -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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to