2009-07-30 07:41:12 +02:00
|
|
|
#ifndef _UTILS_H_
|
2010-09-19 01:16:05 +02:00
|
|
|
#define _UTILS_H_
|
2009-07-11 09:21:38 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2010-09-19 01:16:05 +02:00
|
|
|
extern "C"
|
|
|
|
{
|
2009-07-30 07:41:12 +02:00
|
|
|
#endif
|
2010-09-19 01:16:05 +02:00
|
|
|
/* Constants */
|
|
|
|
#define KB_SIZE 1024.0
|
|
|
|
#define MB_SIZE 1048576.0
|
|
|
|
#define GB_SIZE 1073741824.0
|
2009-07-11 09:21:38 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Macros */
|
2010-09-19 01:16:05 +02:00
|
|
|
#define round_up(x,n) (-(-(x) & -(n)))
|
2009-07-11 09:21:38 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Prototypes */
|
2010-09-19 01:16:05 +02:00
|
|
|
u32 swap32( u32 );
|
2009-07-30 07:41:12 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-07-11 09:21:38 +02:00
|
|
|
#endif
|