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

Function _mi_thread_id

3rd/mimalloc-2.0.9/include/mimalloc-internal.h:846–849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

844#define WIN32_LEAN_AND_MEAN
845#include <windows.h>
846static inline mi_threadid_t _mi_thread_id(void) mi_attr_noexcept {
847 // Windows: works on Intel and ARM in both 32- and 64-bit
848 return (uintptr_t)NtCurrentTeb();
849}
850
851// We use assembly for a fast thread id on the main platforms. The TLS layout depends on
852// both the OS and libc implementation so we use specific tests for each main platform.

Callers 15

mi_vfprintf_threadFunction · 0.85
mi_heap_main_initFunction · 0.85
_mi_heap_initFunction · 0.85
_mi_is_main_threadFunction · 0.85
_mi_thread_doneFunction · 0.85
mi_process_initFunction · 0.85
_mi_heap_malloc_zero_exFunction · 0.85
mi_freeFunction · 0.85
_mi_free_delayed_blockFunction · 0.85
mi_segment_is_validFunction · 0.85
mi_segment_allocFunction · 0.85

Calls 1

mi_tls_slotFunction · 0.85

Tested by

no test coverage detected