svn commit: r296999 - head/sys/sys

Justin Hibbits jhibbits at FreeBSD.org
Fri Mar 18 01:26:57 UTC 2016


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); }
 


More information about the svn-src-all mailing list