mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Add P2BOUNDARY macro
This commit is contained in:
parent
7adbea4141
commit
160c63ab76
@ -165,6 +165,8 @@ extern int ddi_strtoul(const char *str, char **nptr,
|
||||
(-(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)
|
||||
#define P2BOUNDARY(off, len, align) \
|
||||
(((off) ^ ((off) + (len) - 1)) > (align) - 1)
|
||||
|
||||
/*
|
||||
* Typed version of the P2* macros. These macros should be used to ensure
|
||||
|
Loading…
Reference in New Issue
Block a user