From 47283250442a15de423d3bf4368f914105c6364f Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Mon, 9 Sep 2024 13:06:07 +0100
Subject: [PATCH] pipewire: Give hotplug threads a more indicative name
When debugging crash reports, it's helpful to know which thread is
associated with which external library.
Linux limits the length of a thread name to 15 bytes (not including the
zero-termination), so abbreviate Pipewire to "pw" and hotplug to "plug"
to fit the desired information into the allowed space.
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
src/audio/pipewire/SDL_pipewire.c | 2 +-
src/camera/pipewire/SDL_camera_pipewire.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/audio/pipewire/SDL_pipewire.c b/src/audio/pipewire/SDL_pipewire.c
index e619ce6037c95..67b6d8704407d 100644
--- a/src/audio/pipewire/SDL_pipewire.c
+++ b/src/audio/pipewire/SDL_pipewire.c
@@ -723,7 +723,7 @@ static bool hotplug_loop_init(void)
spa_list_init(&hotplug_pending_list);
spa_list_init(&hotplug_io_list);
- hotplug_loop = PIPEWIRE_pw_thread_loop_new("SDLAudioHotplug", NULL);
+ hotplug_loop = PIPEWIRE_pw_thread_loop_new("SDLPwAudioPlug", NULL);
if (!hotplug_loop) {
return SDL_SetError("Pipewire: Failed to create hotplug detection loop (%i)", errno);
}
diff --git a/src/camera/pipewire/SDL_camera_pipewire.c b/src/camera/pipewire/SDL_camera_pipewire.c
index d1b37c47ad104..c1c7a8e11fe60 100644
--- a/src/camera/pipewire/SDL_camera_pipewire.c
+++ b/src/camera/pipewire/SDL_camera_pipewire.c
@@ -981,7 +981,7 @@ static bool hotplug_loop_init(void)
hotplug.have_1_0_5 = PIPEWIRE_pw_check_library_version(1,0,5);
- hotplug.loop = PIPEWIRE_pw_thread_loop_new("SDLAudioHotplug", NULL);
+ hotplug.loop = PIPEWIRE_pw_thread_loop_new("SDLPwCameraPlug", NULL);
if (!hotplug.loop) {
return SDL_SetError("Pipewire: Failed to create hotplug detection loop (%i)", errno);
}