Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing extern of tls_task_group #2759

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions src/butil/thread_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading