bh_platform.h 922 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "runtime_timer.h"
  17. /**
  18. * WA_MALLOC/WA_FREE need to be redefined for both
  19. * runtime native and WASM app respectively.
  20. *
  21. * Some source files are shared for building native and WASM,
  22. * and this the mem allocator API for these files.
  23. *
  24. * Here we define it for the native world
  25. */
  26. #ifndef WA_MALLOC
  27. #define WA_MALLOC wasm_runtime_malloc
  28. #endif
  29. #ifndef WA_FREE
  30. #define WA_FREE wasm_runtime_free
  31. #endif
  32. #endif /* #ifndef _BH_PLATFORM_H */