mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
Add IS_ALIGNED(x, a) macro helper
Change-Id: Ic5799e4bc03cabddece80cbc129b16f3a19ff9c5
This commit is contained in:
parent
d924c83066
commit
d1fcfe950a
1 changed files with 2 additions and 0 deletions
|
@ -134,6 +134,8 @@ int get_cpu_boost_counter(void);
|
|||
(size) = __a2 > __a1 ? __a2 - __a1 : 0; \
|
||||
})
|
||||
|
||||
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
|
||||
|
||||
#define PTR_ADD(ptr, x) ((typeof(ptr))((char*)(ptr) + (x)))
|
||||
#define PTR_SUB(ptr, x) ((typeof(ptr))((char*)(ptr) - (x)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue