shared: add MIN3 macro
This is like MIN but evaluates 3 arguments. We already have MAX3, so add the equivalent for MIN.
This commit is contained in:
parent
3b1a55e110
commit
7df23077e4
|
@ -154,6 +154,12 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
|
|||
_a < _b ? _a : _b; \
|
||||
})
|
||||
|
||||
#define MIN3(x,y,z) \
|
||||
__extension__ ({ \
|
||||
typeof(x) _c = MIN(x,y); \
|
||||
MIN(_c, z); \
|
||||
})
|
||||
|
||||
#define LESS_BY(A,B) \
|
||||
__extension__ ({ \
|
||||
typeof(A) _A = (A); \
|
||||
|
|
Loading…
Reference in a new issue