Commit 11eb2ca4 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

Add ALIGN helper

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent 85506595
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#define round_up(x, y) ((((x) - 1) | __round_mask(x, y)) + 1) #define round_up(x, y) ((((x) - 1) | __round_mask(x, y)) + 1)
#define round_down(x, y) ((x) & ~__round_mask(x, y)) #define round_down(x, y) ((x) & ~__round_mask(x, y))
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
#define min(x, y) ({ \ #define min(x, y) ({ \
typeof(x) _min1 = (x); \ typeof(x) _min1 = (x); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment