Make thread_id a visible thing

Every thread now has a non-recyclable thread id. This will be an aid in
debugging.
This commit is contained in:
ridiculousfish
2019-05-29 12:33:44 -07:00
parent f3ee6a99c3
commit 0863c237b0
3 changed files with 24 additions and 10 deletions

View File

@@ -82,4 +82,8 @@ void iothread_perform_on_main(std::function<void(void)> &&func);
bool make_pthread(pthread_t *result, void *(*func)(void *), void *param);
bool make_pthread(pthread_t *result, std::function<void(void)> &&func);
/// \returns a thread ID for this thread.
/// Thread IDs are never repeated.
uint64_t thread_id();
#endif