mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 23:42:05 +00:00
0f5b73ae67
The host embedder may new/delete wasm-c-api engine simultaneously in multiple threads, which requires lock for the operations. Since there isn't one time called global init/destroy APIs provided by wasm-c-api, we define a global lock and initialize it with thread mutex initializer if the platform supports that, and use it to lock the operations of engine. If the platform doesn't support thread mutex initializer, we require developer to create the lock by himself to ensure the thread-safe of the engine operations. |
||
---|---|---|
.. | ||
platform_init.c | ||
platform_internal.h | ||
shared_platform.cmake |