1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

cleanup THR_KEY_mysys

read TLS with my_thread_var
write TLS with set_mysys_var()

my_thread_var is no longer __attribute__ ((const)): this attribute
is simply incorrect here. Read gcc manual for more information.
sql/threadpool_generic.cc fails with that attribute.
This commit is contained in:
Eugene Kosov
2020-04-07 13:14:41 +03:00
parent da7564edcf
commit 2c5067b689
3 changed files with 14 additions and 14 deletions

View File

@@ -729,13 +729,14 @@ struct st_my_thread_var
#endif
};
extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
struct st_my_thread_var *_my_thread_var(void);
extern void **my_thread_var_dbug(void);
extern safe_mutex_t **my_thread_var_mutex_in_use(void);
extern uint my_thread_end_wait_time;
extern my_bool safe_mutex_deadlock_detector;
#define my_thread_var (_my_thread_var())
#define my_errno my_thread_var->thr_errno
int set_mysys_var(struct st_my_thread_var *mysys_var);
/*
Keep track of shutdown,signal, and main threads so that my_end() will not
report errors with them