vdso_constants.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) 2006-2024 RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2024-07-04 rcitach init ver.
  9. */
  10. #ifndef RT_VDSO_CONSTANTS_H
  11. #define RT_VDSO_CONSTANTS_H
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #define RT_VDSO_DATA_PAGE_COUNT 1
  16. #define RT_VDSO_PAGE_SHIFT 12
  17. #define RT_VDSO_PAGE_SIZE (1 << RT_VDSO_PAGE_SHIFT)
  18. #ifndef read_barrier_depends
  19. #define read_barrier_depends() \
  20. do \
  21. { \
  22. } while (0)
  23. #endif
  24. #ifndef smp_read_barrier_depends
  25. #define smp_read_barrier_depends() read_barrier_depends()
  26. #endif
  27. #if defined(__aarch64__)
  28. #define RT_VDSO_IMAGE_PATH "../user/build/aarch64/libvdso.so"
  29. #elif defined(__arm__)
  30. #define RT_VDSO_IMAGE_PATH "../user/build/arm/libvdso.so"
  31. #elif defined(__riscv)
  32. #define RT_VDSO_IMAGE_PATH "../user/build/risc-v/libvdso.so"
  33. #else
  34. #error "Unsupported architecture for vDSO"
  35. #endif
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif /* RT_VDSO_CONSTANTS_H */