Mesa (main): intel: using C++11 keyword thread_local
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 15 18:05:00 UTC 2022
Module: Mesa
Branch: main
Commit: 0f3064ee445c395fdb09428c48c7ed42b5b7b486
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f3064ee445c395fdb09428c48c7ed42b5b7b486
Author: Yonggang Luo <luoyonggang at gmail.com>
Date: Tue Jun 14 01:54:44 2022 +0800
intel: using C++11 keyword thread_local
Signed-off-by: Yonggang Luo <luoyonggang at gmail.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15087>
---
src/intel/compiler/brw_eu.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/intel/compiler/brw_eu.cpp b/src/intel/compiler/brw_eu.cpp
index f9e435ab6e5..cf20b20eabe 100644
--- a/src/intel/compiler/brw_eu.cpp
+++ b/src/intel/compiler/brw_eu.cpp
@@ -745,8 +745,8 @@ lookup_opcode_desc(gfx_ver *index_ver,
const struct opcode_desc *
brw_opcode_desc(const struct intel_device_info *devinfo, enum opcode opcode)
{
- static __thread gfx_ver index_ver = {};
- static __thread const opcode_desc *index_descs[NUM_BRW_OPCODES];
+ static thread_local gfx_ver index_ver = {};
+ static thread_local const opcode_desc *index_descs[NUM_BRW_OPCODES];
return lookup_opcode_desc(&index_ver, index_descs, ARRAY_SIZE(index_descs),
&opcode_desc::ir, devinfo, opcode);
}
@@ -758,8 +758,8 @@ brw_opcode_desc(const struct intel_device_info *devinfo, enum opcode opcode)
const struct opcode_desc *
brw_opcode_desc_from_hw(const struct intel_device_info *devinfo, unsigned hw)
{
- static __thread gfx_ver index_ver = {};
- static __thread const opcode_desc *index_descs[128];
+ static thread_local gfx_ver index_ver = {};
+ static thread_local const opcode_desc *index_descs[128];
return lookup_opcode_desc(&index_ver, index_descs, ARRAY_SIZE(index_descs),
&opcode_desc::hw, devinfo, hw);
}
More information about the mesa-commit
mailing list