aboutsummaryrefslogtreecommitdiff
path: root/depends/packages/libxkbcommon.mk
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2024-05-13 16:57:03 +0200
committerVasil Dimov <vd@FreeBSD.org>2024-05-16 18:16:46 +0200
commitd35ba1b3f16071b8fe9b36398ba15352dbf2a54d (patch)
tree1c99fb1a3e0f49eb758cb6931bc068f4cb1bf7d8 /depends/packages/libxkbcommon.mk
parentb94061902e52132489fe296c12396798700f1f35 (diff)
util: avoid using thread_local variable that has a destructor
Store the thread name in a `thread_local` variable of type `char[]` instead of `std::string`. This avoids calling the destructor when the thread exits. This is a workaround for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278701 For type-safety, return `std::string` from `util::ThreadGetInternalName()` instead of `char[]`. As a side effect of this change, we no longer store a reference to a `thread_local` variable in `CLockLocation`. This was dangerous because if the thread quits while the reference still exists (in the global variable `lock_data`, see inside `GetLockData()`) then the reference will become dangling.
Diffstat (limited to 'depends/packages/libxkbcommon.mk')
0 files changed, 0 insertions, 0 deletions