diff options
| author | Marc Sunet <marc.sunet@amd.com> | 2025-11-18 18:50:03 -0800 |
|---|---|---|
| committer | Marc Sunet <marc.sunet@amd.com> | 2025-11-18 18:50:03 -0800 |
| commit | b1fbff0da622160a2334a59de7f9090fecb5dad6 (patch) | |
| tree | 61557d59376d5d4c6f66dd5b498311571f806cba | |
| parent | ed86aad6d36294e219bc7ffa1f14d2e39fad7ade (diff) | |
Thread-local exception error buffer
| -rw-r--r-- | dxcommon/include/dxcommon.h | 2 | ||||
| -rw-r--r-- | dxcommon/src/dxcommon.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/dxcommon/include/dxcommon.h b/dxcommon/include/dxcommon.h index e04f8e9..35ec0e2 100644 --- a/dxcommon/include/dxcommon.h +++ b/dxcommon/include/dxcommon.h | |||
| @@ -32,7 +32,7 @@ public: | |||
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | private: | 34 | private: |
| 35 | static char m_error[1024]; | 35 | static thread_local char m_error[1024]; |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | #define THROW(error) throw exception(error, __FILE__, __LINE__) | 38 | #define THROW(error) throw exception(error, __FILE__, __LINE__) |
diff --git a/dxcommon/src/dxcommon.cc b/dxcommon/src/dxcommon.cc index 841ebcd..2139136 100644 --- a/dxcommon/src/dxcommon.cc +++ b/dxcommon/src/dxcommon.cc | |||
| @@ -3,6 +3,6 @@ | |||
| 3 | namespace dx | 3 | namespace dx |
| 4 | { | 4 | { |
| 5 | 5 | ||
| 6 | char exception::m_error[1024]; | 6 | thread_local char exception::m_error[1024]; |
| 7 | 7 | ||
| 8 | } // namespace dx | 8 | } // namespace dx |
