Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch
This commit is contained in:
commit
ecdf940cb3
|
@ -47,17 +47,19 @@
|
|||
/*
|
||||
* Compatibility macros/typedefs needed for Solaris -> Linux port
|
||||
*/
|
||||
#define P2ALIGN(x, align) ((x) & -(align))
|
||||
#define P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1)
|
||||
#define P2ROUNDUP(x, align) (-(-(x) & -(align)))
|
||||
#define P2ALIGN(x, align) ((x) & -(align))
|
||||
#define P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1)
|
||||
#define P2ROUNDUP(x, align) (-(-(x) & -(align)))
|
||||
#define P2ROUNDUP_TYPED(x, align, type) \
|
||||
(-(-(type)(x) & -(type)(align)))
|
||||
#define P2PHASE(x, align) ((x) & ((align) - 1))
|
||||
#define P2NPHASE(x, align) (-(x) & ((align) - 1))
|
||||
(-(-(type)(x) & -(type)(align)))
|
||||
#define P2BOUNDARY(off, len, align) \
|
||||
(((off) ^ ((off) + (len) - 1)) > (align) - 1)
|
||||
#define P2PHASE(x, align) ((x) & ((align) - 1))
|
||||
#define P2NPHASE(x, align) (-(x) & ((align) - 1))
|
||||
#define P2NPHASE_TYPED(x, align, type) \
|
||||
(-(type)(x) & ((type)(align) - 1))
|
||||
#define ISP2(x) (((x) & ((x) - 1)) == 0)
|
||||
#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0)
|
||||
(-(type)(x) & ((type)(align) - 1))
|
||||
#define ISP2(x) (((x) & ((x) - 1)) == 0)
|
||||
#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0)
|
||||
|
||||
/*
|
||||
* Typed version of the P2* macros. These macros should be used to ensure
|
||||
|
|
Loading…
Reference in New Issue