types.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef __ASM_NIOS2_TYPES_H_
  2. #define __ASM_NIOS2_TYPES_H_
  3. /*
  4. * This file is never included by application software unless
  5. * explicitly requested (e.g., via linux/types.h) in which case the
  6. * application is Linux specific so (user-) name space pollution is
  7. * not a major issue. However, for interoperability, libraries still
  8. * need to be careful to avoid a name clashes.
  9. */
  10. typedef unsigned short umode_t;
  11. /*
  12. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  13. * header files exported to user space
  14. */
  15. typedef __signed__ char __s8;
  16. typedef unsigned char __u8;
  17. typedef __signed__ short __s16;
  18. typedef unsigned short __u16;
  19. typedef __signed__ int __s32;
  20. typedef unsigned int __u32;
  21. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  22. typedef __signed__ long long __s64;
  23. typedef unsigned long long __u64;
  24. #endif
  25. /*
  26. * These aren't exported outside the kernel to avoid name space clashes
  27. */
  28. #ifdef __KERNEL__
  29. typedef signed char s8;
  30. typedef unsigned char u8;
  31. typedef signed short s16;
  32. typedef unsigned short u16;
  33. typedef signed int s32;
  34. typedef unsigned int u32;
  35. typedef signed long long s64;
  36. typedef unsigned long long u64;
  37. #define BITS_PER_LONG 32
  38. /* Dma addresses are 32-bits wide. */
  39. typedef u32 dma_addr_t;
  40. #endif /* __KERNEL__ */
  41. #endif /* __ASM_NIOS2_TYPES_H */