mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 06:59:32 +03:00
add comment that thread id's should not be zero, issue #698
This commit is contained in:
parent
0b4c3da2e9
commit
c92e9e7bf7
1 changed files with 3 additions and 2 deletions
|
@ -104,12 +104,13 @@ void _mi_prim_thread_associate_default_heap(mi_heap_t* heap);
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// Thread id
|
// Thread id: `_mi_prim_thread_id()`
|
||||||
//
|
//
|
||||||
// Getting the thread id should be performant as it is called in the
|
// Getting the thread id should be performant as it is called in the
|
||||||
// fast path of `_mi_free` and we specialize for various platforms as
|
// fast path of `_mi_free` and we specialize for various platforms as
|
||||||
// inlined definitions. Regular code should call `init.c:_mi_thread_id()`.
|
// inlined definitions. Regular code should call `init.c:_mi_thread_id()`.
|
||||||
// We only require _mi_prim_thread_id() to return a unique id for each thread.
|
// We only require _mi_prim_thread_id() to return a unique id
|
||||||
|
// for each thread (unequal to zero).
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
|
||||||
static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept;
|
static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept;
|
||||||
|
|
Loading…
Add table
Reference in a new issue