You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

big_bswap.h 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef ETHERBOOT_BIG_BSWAP_H
  2. #define ETHERBOOT_BIG_BSWAP_H
  3. #define ntohl(x) (x)
  4. #define htonl(x) (x)
  5. #define ntohs(x) (x)
  6. #define htons(x) (x)
  7. #define cpu_to_le64(x) __bswap_64(x)
  8. #define cpu_to_le32(x) __bswap_32(x)
  9. #define cpu_to_le16(x) __bswap_16(x)
  10. #define cpu_to_be64(x) (x)
  11. #define cpu_to_be32(x) (x)
  12. #define cpu_to_be16(x) (x)
  13. #define le64_to_cpu(x) __bswap_64(x)
  14. #define le32_to_cpu(x) __bswap_32(x)
  15. #define le16_to_cpu(x) __bswap_16(x)
  16. #define be64_to_cpu(x) (x)
  17. #define be32_to_cpu(x) (x)
  18. #define be16_to_cpu(x) (x)
  19. #define cpu_to_le64s(x) __bswap_64s(x)
  20. #define cpu_to_le32s(x) __bswap_32s(x)
  21. #define cpu_to_le16s(x) __bswap_16s(x)
  22. #define cpu_to_be64s(x) do {} while (0)
  23. #define cpu_to_be32s(x) do {} while (0)
  24. #define cpu_to_be16s(x) do {} while (0)
  25. #define le64_to_cpus(x) __bswap_64s(x)
  26. #define le32_to_cpus(x) __bswap_32s(x)
  27. #define le16_to_cpus(x) __bswap_16s(x)
  28. #define be64_to_cpus(x) do {} while (0)
  29. #define be32_to_cpus(x) do {} while (0)
  30. #define be16_to_cpus(x) do {} while (0)
  31. #endif /* ETHERBOOT_BIG_BSWAP_H */