types.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* types.h: FRV types
  2. *
  3. * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the License, or (at your option) any later version.
  10. */
  11. #ifndef _ASM_TYPES_H
  12. #define _ASM_TYPES_H
  13. #ifndef __ASSEMBLY__
  14. typedef unsigned short umode_t;
  15. /*
  16. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  17. * header files exported to user space
  18. */
  19. typedef __signed__ char __s8;
  20. typedef unsigned char __u8;
  21. typedef __signed__ short __s16;
  22. typedef unsigned short __u16;
  23. typedef __signed__ int __s32;
  24. typedef unsigned int __u32;
  25. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  26. typedef __signed__ long long __s64;
  27. typedef unsigned long long __u64;
  28. #endif
  29. #endif /* __ASSEMBLY__ */
  30. /*
  31. * These aren't exported outside the kernel to avoid name space clashes
  32. */
  33. #ifdef __KERNEL__
  34. #define BITS_PER_LONG 32
  35. #ifndef __ASSEMBLY__
  36. #include <linux/config.h>
  37. typedef signed char s8;
  38. typedef unsigned char u8;
  39. typedef signed short s16;
  40. typedef unsigned short u16;
  41. typedef signed int s32;
  42. typedef unsigned int u32;
  43. typedef signed long long s64;
  44. typedef unsigned long long u64;
  45. /* Dma addresses are 32-bits wide. */
  46. typedef u32 dma_addr_t;
  47. #endif /* __ASSEMBLY__ */
  48. #endif /* __KERNEL__ */
  49. #endif /* _ASM_TYPES_H */