types.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (c) 2011 The Chromium OS Authors.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __ASM_SANDBOX_TYPES_H
  7. #define __ASM_SANDBOX_TYPES_H
  8. typedef unsigned short umode_t;
  9. /*
  10. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  11. * header files exported to user space
  12. */
  13. typedef __signed__ char __s8;
  14. typedef unsigned char __u8;
  15. typedef __signed__ short __s16;
  16. typedef unsigned short __u16;
  17. typedef __signed__ int __s32;
  18. typedef unsigned int __u32;
  19. #if defined(__GNUC__)
  20. __extension__ typedef __signed__ long long __s64;
  21. __extension__ typedef unsigned long long __u64;
  22. #endif
  23. /*
  24. * These aren't exported outside the kernel to avoid name space clashes
  25. */
  26. #ifdef __KERNEL__
  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. #if !defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__)
  34. typedef signed long long s64;
  35. typedef unsigned long long u64;
  36. #else
  37. typedef __INT64_TYPE__ s64;
  38. typedef __UINT64_TYPE__ u64;
  39. #endif
  40. #define BITS_PER_LONG CONFIG_SANDBOX_BITS_PER_LONG
  41. typedef unsigned long dma_addr_t;
  42. typedef u32 phys_addr_t;
  43. typedef u32 phys_size_t;
  44. #endif /* __KERNEL__ */
  45. #endif