util/macros: Move DIV_ROUND_UP to util/macros.h

Move DIV_ROUND_UP to a shared location accessible everywhere

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
Axel Davy
2015-04-26 23:17:45 +02:00
parent 405c7d7511
commit 64880d073a
3 changed files with 3 additions and 6 deletions

View File

@@ -182,5 +182,7 @@ do { \
#define UNUSED
#endif
/** Compute ceiling of integer quotient of A divided by B. */
#define DIV_ROUND_UP( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
#endif /* UTIL_MACROS_H */