tree: 5791f24c357eb3953232892231a3ee95154aaa39 [search]
  1. emscripten/
  2. osx/
  3. unix/
  4. wasi/
  5. windows/
  6. prim-tls.c
  7. prim.c
  8. readme.md
src/prim/readme.md

Portability Primitives

This is the portability layer where all primitives needed from the OS are defined.

  • include/mimalloc/prim.h: primitive portability API definition.

  • prim.c: Selects one of unix/prim.c, wasi/prim.c, or windows/prim.c depending on the host platform (and on macOS, osx/prim.c defers to unix/prim.c).

  • include/mimalloc/prim-tls.h: primitive TLS model (thread local, pthreads, etc)

  • prim-tls.c: TLS model implementation

Note: still work in progress, there may still be places in the sources that still depend on OS ifdef's.