2009-05-03 14:53:31 -04:00
|
|
|
#ifndef _UTILS_H_
|
|
|
|
#define _UTILS_H_
|
|
|
|
|
2009-11-15 16:52:58 -03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-05-03 14:53:31 -04:00
|
|
|
/* Constants */
|
|
|
|
#define KB_SIZE 1024.0
|
|
|
|
#define MB_SIZE 1048576.0
|
|
|
|
#define GB_SIZE 1073741824.0
|
|
|
|
|
|
|
|
/* Macros */
|
|
|
|
#define round_up(x,n) (-(-(x) & -(n)))
|
|
|
|
|
|
|
|
/* Prototypes */
|
|
|
|
u32 swap32(u32);
|
|
|
|
|
2009-11-15 16:52:58 -03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-05-03 14:53:31 -04:00
|
|
|
#endif
|