Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Mar 2016 01:26:56 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296999 - head/sys/sys
Message-ID:  <201603180126.u2I1QuL8039410@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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); }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603180126.u2I1QuL8039410>