You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ji...@apache.org on 2024/09/08 15:57:48 UTC
(brpc) branch master updated: Fix missing extern of tls_task_group (#2759)
This is an automated email from the ASF dual-hosted git repository.
jiashunzhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new cdc81018 Fix missing extern of tls_task_group (#2759)
cdc81018 is described below
commit cdc8101832732ebf21127b455dee6882a7504689
Author: Bright Chen <ch...@foxmail.com>
AuthorDate: Sun Sep 8 23:57:43 2024 +0800
Fix missing extern of tls_task_group (#2759)
---
src/butil/thread_local.h | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/butil/thread_local.h b/src/butil/thread_local.h
index a67327c6..8c83947c 100644
--- a/src/butil/thread_local.h
+++ b/src/butil/thread_local.h
@@ -46,11 +46,6 @@
var_name = v; \
}
-#define EXTERN_BAIDU_VOLATILE_THREAD_LOCAL(type, var_name) \
- type get_##var_name(void); \
- type *get_ptr_##var_name(void); \
- void set_##var_name(type v)
-
#if (defined (__aarch64__) && defined (__GNUC__)) || defined(__clang__)
// GNU compiler under aarch and Clang compiler is incorrectly caching the
// address of thread_local variables across a suspend-point. The following
@@ -60,9 +55,9 @@
#define BAIDU_SET_VOLATILE_THREAD_LOCAL(var_name, value) set_##var_name(value)
#define EXTERN_BAIDU_VOLATILE_THREAD_LOCAL(type, var_name) \
- type get_##var_name(void); \
- type *get_ptr_##var_name(void); \
- void set_##var_name(type v)
+ extern type get_##var_name(void); \
+ extern type *get_ptr_##var_name(void); \
+ extern void set_##var_name(type v)
#else
#define BAIDU_GET_VOLATILE_THREAD_LOCAL(var_name) var_name
#define BAIDU_GET_PTR_VOLATILE_THREAD_LOCAL(var_name) &##var_name
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org