mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 00:50:50 +00:00
kern: Globally define abs64
So we can use it in non-linuxkpi sources. Reviewed by: emaste, mmel Differential Revision: https://reviews.freebsd.org/D41767 Sponsored by: Beckhoff Automation GmbH & Co. KG
This commit is contained in:
parent
602d360186
commit
229c65a83f
|
@ -623,12 +623,6 @@ mult_frac(uintmax_t x, uintmax_t multiplier, uintmax_t divisor)
|
|||
return ((q * multiplier) + ((r * multiplier) / divisor));
|
||||
}
|
||||
|
||||
static inline int64_t
|
||||
abs64(int64_t x)
|
||||
{
|
||||
return (x < 0 ? -x : x);
|
||||
}
|
||||
|
||||
typedef struct linux_ratelimit {
|
||||
struct timeval lasttime;
|
||||
int counter;
|
||||
|
|
|
@ -113,6 +113,7 @@ 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); }
|
||||
static __inline int abs(int a) { return (a < 0 ? -a : a); }
|
||||
static __inline long labs(long a) { return (a < 0 ? -a : a); }
|
||||
static __inline int64_t abs64(int64_t a) { return (a < 0 ? -a : a); }
|
||||
static __inline quad_t qabs(quad_t a) { return (a < 0 ? -a : a); }
|
||||
|
||||
#ifndef RANDOM_FENESTRASX
|
||||
|
|
Loading…
Reference in a new issue