/arch/powerpc/boot/types.h

https://github.com/aicjofs/android_kernel_lge_v500_20d_f2fs · C Header · 27 lines · 22 code · 5 blank · 0 comment · 2 complexity · 7b68d4487ba26a7a29fffa0a85fad90b MD5 · raw file

  1. #ifndef _TYPES_H_
  2. #define _TYPES_H_
  3. #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
  4. typedef unsigned char u8;
  5. typedef unsigned short u16;
  6. typedef unsigned int u32;
  7. typedef unsigned long long u64;
  8. typedef signed char s8;
  9. typedef short s16;
  10. typedef int s32;
  11. typedef long long s64;
  12. #define min(x,y) ({ \
  13. typeof(x) _x = (x); \
  14. typeof(y) _y = (y); \
  15. (void) (&_x == &_y); \
  16. _x < _y ? _x : _y; })
  17. #define max(x,y) ({ \
  18. typeof(x) _x = (x); \
  19. typeof(y) _y = (y); \
  20. (void) (&_x == &_y); \
  21. _x > _y ? _x : _y; })
  22. #endif /* _TYPES_H_ */