X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Ferror.hpp;fp=src%2Fcommon%2Ferror.hpp;h=d1996384db5c839cd2764e62d36dcb7d26e6499c;hp=93616718f65dd89481492d39bf7ef0fe8ba1d261;hb=9fd09ab6c005d062ce436ad54738e83313f65af2;hpb=5b9eda8a30a21a1c9de4572dd2b397c7cf923fa1 diff --git a/src/common/error.hpp b/src/common/error.hpp index 93616718f..d1996384d 100644 --- a/src/common/error.hpp +++ b/src/common/error.hpp @@ -46,7 +46,8 @@ struct log_time { /* Format: 00:00:00.000000000 plus NULL byte. */ char str[19]; }; -extern DECLARE_URCU_TLS(const char *, logger_thread_name); + +extern thread_local const char * logger_thread_name; extern int lttng_opt_quiet; extern int lttng_opt_verbose; @@ -159,7 +160,7 @@ static inline void __lttng_print_check_abort(enum lttng_error_level type) msg " - %s [%s]: " fmt " (in %s() at " __FILE__ \ ":" XSTR(__LINE__) ")\n", \ log_add_time(), \ - URCU_TLS(logger_thread_name) ?: generic_name, \ + logger_thread_name ?: generic_name, \ ##args, \ __func__); \ } \ @@ -179,7 +180,7 @@ static inline void __lttng_print_check_abort(enum lttng_error_level type) __lttng_print(type, \ msg " - %s [%s]: " fmt "\n", \ log_add_time(), \ - URCU_TLS(logger_thread_name) ?: generic_name, \ + logger_thread_name ?: generic_name, \ ##args); \ } \ } while (0)