mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-22 13:52:54 +00:00
tests: Extract ALIGN macro into a common header
Makes for a little bit less code duplication, especially since it will be used from more callers in the future. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
committed by
Thomas Wood
parent
e32664c8ee
commit
dc14bf455d
@@ -60,6 +60,15 @@ static inline void *igt_mmap64(void *addr, size_t length, int prot, int flags,
|
||||
*/
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
|
||||
|
||||
/**
|
||||
* ALIGN:
|
||||
* @v: value to be aligned
|
||||
* @a: alignment unit in bytes
|
||||
*
|
||||
* Macro to align a value @v to a specified unit @a.
|
||||
*/
|
||||
#define ALIGN(v, a) (((v) + (a)-1) & ~((a)-1))
|
||||
|
||||
int drm_get_card(void);
|
||||
int drm_open_any(void);
|
||||
int drm_open_any_render(void);
|
||||
|
||||
Reference in New Issue
Block a user