diff options
author | dg <dg@FreeBSD.org> | 1994-08-30 18:19:47 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-08-30 18:19:47 +0000 |
commit | 33e88fdce99396771f6d5750e4a1128a333abc9e (patch) | |
tree | 4760162be5b2c5e6f81d6d36b872c1fdb76ba5b9 /sys/libkern | |
parent | f81bd8035baf33a0773ca92bf6cb09e3110181e1 (diff) | |
download | FreeBSD-src-33e88fdce99396771f6d5750e4a1128a333abc9e.zip FreeBSD-src-33e88fdce99396771f6d5750e4a1128a333abc9e.tar.gz |
Added qmin and qmax functions to deal with quad_t's.
Diffstat (limited to 'sys/libkern')
-rw-r--r-- | sys/libkern/libkern.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/libkern/libkern.h b/sys/libkern/libkern.h index d4669c7..752c28c 100644 --- a/sys/libkern/libkern.h +++ b/sys/libkern/libkern.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)libkern.h 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: libkern.h,v 1.2 1994/08/02 07:44:03 davidg Exp $ */ #include <sys/types.h> @@ -85,6 +85,19 @@ ulmin(a, b) return (a < b ? a : b); } +static inline quad_t +qmax(a, b) + quad_t a, b; +{ + return (a > b ? a : b); +} +static inline quad_t +qmin(a, b) + quad_t a, b; +{ + return (a < b ? a : b); +} + /* Prototypes for non-quad routines. */ int bcmp __P((const void *, const void *, size_t)); int ffs __P((int)); |