From owner-svn-src-all@freebsd.org Fri Mar 18 01:26:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 162DFAD4F64; Fri, 18 Mar 2016 01:26:57 +0000 (UTC) (envelope-from jhibbits@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 mx1.freebsd.org (Postfix) with ESMTPS id DBE781836; Fri, 18 Mar 2016 01:26:56 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2I1Qu1c039411; Fri, 18 Mar 2016 01:26:56 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2I1QuL8039410; Fri, 18 Mar 2016 01:26:56 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201603180126.u2I1QuL8039410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 18 Mar 2016 01:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296999 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 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: Fri, 18 Mar 2016 01:26:57 -0000 Author: jhibbits Date: Fri Mar 18 01:26:55 2016 New Revision: 296999 URL: https://svnweb.freebsd.org/changeset/base/296999 Log: Add ummax()/ummin() to libkern. This is committed in isolation from a larger patch so that it can be MFC'd separately if needed. Modified: head/sys/sys/libkern.h Modified: head/sys/sys/libkern.h ============================================================================== --- head/sys/sys/libkern.h Fri Mar 18 00:02:46 2016 (r296998) +++ head/sys/sys/libkern.h Fri Mar 18 01:26:55 2016 (r296999) @@ -65,6 +65,16 @@ static __inline u_quad_t uqmax(u_quad_t static __inline u_quad_t uqmin(u_quad_t a, u_quad_t b) { return (a < b ? a : b); } static __inline u_long ulmax(u_long a, u_long b) { return (a > b ? a : b); } static __inline u_long ulmin(u_long a, u_long b) { return (a < b ? a : b); } +static __inline __uintmax_t ummax(__uintmax_t a, __uintmax_t b) +{ + + return (a > b ? a : b); +} +static __inline __uintmax_t ummin(__uintmax_t a, __uintmax_t b) +{ + + return (a < b ? a : b); +} static __inline off_t omax(off_t a, off_t b) { return (a > b ? a : b); } static __inline off_t omin(off_t a, off_t b) { return (a < b ? a : b); }