summaryrefslogtreecommitdiff
path: root/libusb/os/linux_udev.c
diff options
context:
space:
mode:
Diffstat (limited to 'libusb/os/linux_udev.c')
-rw-r--r--libusb/os/linux_udev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libusb/os/linux_udev.c b/libusb/os/linux_udev.c
index d079c79..d8851cf 100644
--- a/libusb/os/linux_udev.c
+++ b/libusb/os/linux_udev.c
@@ -176,6 +176,12 @@ static void *linux_udev_event_thread_main(void *arg)
.events = POLLIN},
};
+#if defined(HAVE_PTHREAD_SETNAME_NP)
+ r = pthread_setname_np(pthread_self(), "libusb_event");
+ if (r)
+ usbi_warn(NULL, "failed to set hotplug event thread name, error=%d", r);
+#endif
+
usbi_dbg("udev event thread entering.");
while ((r = poll(fds, 2, -1)) >= 0 || errno == EINTR) {