types.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef __ASM_SH_TYPES_H
  2. #define __ASM_SH_TYPES_H
  3. #ifndef __ASSEMBLY__
  4. typedef unsigned short umode_t;
  5. /*
  6. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  7. * header files exported to user space
  8. */
  9. typedef __signed__ char __s8;
  10. typedef unsigned char __u8;
  11. typedef __signed__ short __s16;
  12. typedef unsigned short __u16;
  13. typedef __signed__ int __s32;
  14. typedef unsigned int __u32;
  15. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  16. typedef __signed__ long long __s64;
  17. typedef unsigned long long __u64;
  18. #endif
  19. #endif /* __ASSEMBLY__ */
  20. /*
  21. * These aren't exported outside the kernel to avoid name space clashes
  22. */
  23. #ifdef __KERNEL__
  24. #define BITS_PER_LONG 32
  25. #ifndef __ASSEMBLY__
  26. #include <linux/config.h>
  27. typedef __signed__ char s8;
  28. typedef unsigned char u8;
  29. typedef __signed__ short s16;
  30. typedef unsigned short u16;
  31. typedef __signed__ int s32;
  32. typedef unsigned int u32;
  33. typedef __signed__ long long s64;
  34. typedef unsigned long long u64;
  35. /* Dma addresses are 32-bits wide. */
  36. typedef u32 dma_addr_t;
  37. #ifdef CONFIG_LBD
  38. typedef u64 sector_t;
  39. #define HAVE_SECTOR_T
  40. #endif
  41. #ifdef CONFIG_LSF
  42. typedef u64 blkcnt_t;
  43. #define HAVE_BLKCNT_T
  44. #endif
  45. #endif /* __ASSEMBLY__ */
  46. #endif /* __KERNEL__ */
  47. #endif /* __ASM_SH_TYPES_H */