bh_platform.h 945 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #ifndef _BH_PLATFORM_H
  6. #define _BH_PLATFORM_H
  7. #include "../platform/include/platform_common.h"
  8. #include "../platform/include/platform_api_vmcore.h"
  9. #include "../platform/include/platform_api_extension.h"
  10. #include "bh_assert.h"
  11. #include "bh_common.h"
  12. #include "bh_hashmap.h"
  13. #include "bh_list.h"
  14. #include "bh_log.h"
  15. #include "bh_queue.h"
  16. #include "bh_vector.h"
  17. #include "runtime_timer.h"
  18. /**
  19. * WA_MALLOC/WA_FREE need to be redefined for both
  20. * runtime native and WASM app respectively.
  21. *
  22. * Some source files are shared for building native and WASM,
  23. * and this the mem allocator API for these files.
  24. *
  25. * Here we define it for the native world
  26. */
  27. #ifndef WA_MALLOC
  28. #define WA_MALLOC wasm_runtime_malloc
  29. #endif
  30. #ifndef WA_FREE
  31. #define WA_FREE wasm_runtime_free
  32. #endif
  33. #endif /* #ifndef _BH_PLATFORM_H */