diff --git a/include/ofi.h b/include/ofi.h index 9661a7553d9..6239a6b1f3c 100644 --- a/include/ofi.h +++ b/include/ofi.h @@ -320,7 +320,7 @@ struct ofi_filter { extern struct ofi_filter prov_log_filter; extern struct fi_provider core_prov; -extern const char *log_prefix; +extern _Thread_local const char *log_prefix; void ofi_create_filter(struct ofi_filter *filter, const char *env_name); void ofi_free_filter(struct ofi_filter *filter); diff --git a/src/common.c b/src/common.c index 0d641ac74a1..4ae2d411afd 100644 --- a/src/common.c +++ b/src/common.c @@ -2429,4 +2429,4 @@ size_t ofi_vrb_speed(uint8_t speed, uint8_t width) } /* log_prefix is used by fi_log and by prov/util */ -const char *log_prefix = ""; +_Thread_local const char *log_prefix = "";