O2S C Library 1.8.2
Provide high-level data-structures and other fundamental tools for C projects
Loading...
Searching...
No Matches
thread.h
Go to the documentation of this file.
1#pragma once
2
3/* ************************************************************************** */
4/* ____ _ _____ ____ _ _ _ _____ _ _ ____ ____ */
5/* / ___| / \ | ___| _ \ / \ | \ | | |_ _| || | | _ \/ ___| */
6/* \___ \ / _ \ | |_ | |_) | / _ \ | \| | | | | || |_| | | \___ \ */
7/* ___) / ___ \| _| | _ < / ___ \| |\ | | | |__ _| |_| |___) | */
8/* |____/_/ \_|_| |_| \_/_/ \_|_| \_| |_| |_| |____/|____/ */
9/* */
16/* ************************************************************************** */
17
18#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 202300L
19/* # warning including threads.h to have thread_local before C23 */
20# include <threads.h> // thread_local
21#endif
22
23void o2s_thread_set_name(const char* name);
24
25thread_local extern char o2s_thread_name[8];
thread_local char o2s_thread_name[8]
Thread name, used when logging.
Definition thread.c:25
void o2s_thread_set_name(const char *name)
Sets both the O2S thread name and the POSIX thread name (/proc/self/task/tid/comm).
Definition thread.c:32