types.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* $Id: types.h,v 1.4 2001/10/09 02:24:35 davem Exp $ */
  2. #ifndef _SPARC64_TYPES_H
  3. #define _SPARC64_TYPES_H
  4. /*
  5. * This file is never included by application software unless
  6. * explicitly requested (e.g., via linux/types.h) in which case the
  7. * application is Linux specific so (user-) name space pollution is
  8. * not a major issue. However, for interoperability, libraries still
  9. * need to be careful to avoid a name clashes.
  10. */
  11. #ifndef __ASSEMBLY__
  12. typedef unsigned short umode_t;
  13. /*
  14. * _xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  15. * header files exported to user space.
  16. */
  17. typedef __signed__ char __s8;
  18. typedef unsigned char __u8;
  19. typedef __signed__ short __s16;
  20. typedef unsigned short __u16;
  21. typedef __signed__ int __s32;
  22. typedef unsigned int __u32;
  23. typedef __signed__ long __s64;
  24. typedef unsigned long __u64;
  25. #endif /* __ASSEMBLY__ */
  26. #ifdef __KERNEL__
  27. #define BITS_PER_LONG 64
  28. #ifndef __ASSEMBLY__
  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 s64;
  36. typedef unsigned long u64;
  37. /* Dma addresses come in generic and 64-bit flavours. */
  38. typedef u32 dma_addr_t;
  39. typedef u64 dma64_addr_t;
  40. #endif /* __ASSEMBLY__ */
  41. #endif /* __KERNEL__ */
  42. #endif /* defined(_SPARC64_TYPES_H) */