Skip to content

Commit

Permalink
pipewire: Give hotplug threads a more indicative name
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
smcv committed Sep 9, 2024
1 parent 6e885d9 commit 8c3030b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/audio/pipewire/SDL_pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/camera/pipewire/SDL_camera_pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8c3030b

Please sign in to comment.