MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / _mi_is_main_thread

Function _mi_is_main_thread

3rd/mimalloc-2.0.9/src/init.c:418–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416
417
418bool _mi_is_main_thread(void) {
419 return (_mi_heap_main.thread_id==0 || _mi_heap_main.thread_id == _mi_thread_id());
420}
421
422static _Atomic(size_t) thread_count = MI_ATOMIC_VAR_INIT(1);
423

Callers 5

mi_vfprintf_threadFunction · 0.85
_mi_heap_initFunction · 0.85
_mi_heap_doneFunction · 0.85
mi_process_loadFunction · 0.85
mi_heap_collect_exFunction · 0.85

Calls 1

_mi_thread_idFunction · 0.85

Tested by

no test coverage detected