bh_platform.h 960 B

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