From owner-svn-src-all@freebsd.org Mon Nov 19 18:23:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB5A311227BB; Mon, 19 Nov 2018 18:23:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82F0485025; Mon, 19 Nov 2018 18:23:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 645A625B26; Mon, 19 Nov 2018 18:23:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAJINIFp093946; Mon, 19 Nov 2018 18:23:18 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAJINIfp093945; Mon, 19 Nov 2018 18:23:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201811191823.wAJINIfp093945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 19 Nov 2018 18:23:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340641 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 340641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 82F0485025 X-Spamd-Result: default: False [0.31 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.02)[0.018,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.30)[0.297,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2018 18:23:20 -0000 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;