mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
Port to WebAssembly
This commit is contained in:
parent
8dc0b5345b
commit
9129ab0f64
5 changed files with 51 additions and 1 deletions
|
@ -196,6 +196,11 @@ static inline void mi_atomic_write(volatile uintptr_t* p, uintptr_t x) {
|
|||
asm volatile("yield");
|
||||
}
|
||||
#endif
|
||||
#elif defined(__wasi__)
|
||||
#include <sched.h>
|
||||
static inline void mi_atomic_yield() {
|
||||
sched_yield();
|
||||
}
|
||||
#else
|
||||
#include <unistd.h>
|
||||
static inline void mi_atomic_yield(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue