aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2016-03-18 01:26:55 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2016-03-18 01:26:55 +0000
commit7b54043f1718af1af1549296b25d0803f72799cf (patch)
tree77a449ab496f5c12cbeb0abf5f54aa4b1850e843 /sys
parent23cd11b6035bd75d09de25120c66892139aaeb59 (diff)
downloadsrc-7b54043f1718af1af1549296b25d0803f72799cf.tar.gz
src-7b54043f1718af1af1549296b25d0803f72799cf.zip
Add ummax()/ummin() to libkern.
This is committed in isolation from a larger patch so that it can be MFC'd separately if needed.
Notes
Notes: svn path=/head/; revision=296999
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/libkern.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h
index efbaa4a25a4d..b1b725727116 100644
--- a/sys/sys/libkern.h
+++ b/sys/sys/libkern.h
@@ -65,6 +65,16 @@ static __inline u_quad_t uqmax(u_quad_t a, u_quad_t b) { return (a > b ? a : b);
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); }