util: Add a helper macro for defining initial-exec variables.
I'm going to add another case for Android shortly, and then we can keep the logic all in one spot. Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10389>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include <stdarg.h>
|
||||
#include "c99_compat.h"
|
||||
#include "c11/threads.h"
|
||||
#include "util/u_thread.h"
|
||||
|
||||
#include "egllog.h"
|
||||
#include "eglcurrent.h"
|
||||
@@ -45,8 +46,7 @@ static tss_t _egl_TSD;
|
||||
static void _eglDestroyThreadInfo(_EGLThreadInfo *t);
|
||||
|
||||
#ifdef USE_ELF_TLS
|
||||
static __thread const _EGLThreadInfo *_egl_TLS
|
||||
__attribute__ ((tls_model("initial-exec")));
|
||||
static __THREAD_INITIAL_EXEC const _EGLThreadInfo *_egl_TLS;
|
||||
#endif
|
||||
|
||||
static inline void _eglSetTSD(const _EGLThreadInfo *t)
|
||||
|
Reference in New Issue
Block a user