[RFC PATCH v1 5/5] node_device_udev: Rename `th` to `udevThread`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The new thread name makes it easier to understand the purpose of the thread.

Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxx>
---
 src/node_device/node_device_udev.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index ca60f6f7db82..87be5ae254ac 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -64,7 +64,7 @@ struct _udevEventData {
     int watch;
 
     /* Thread data */
-    virThread *th;
+    virThread *udevThread;
     virCond threadCond;
     bool threadQuit;
     bool dataReady;
@@ -1740,9 +1740,9 @@ nodeStateCleanup(void)
             virThreadJoin(priv->initThread);
             g_clear_pointer(&priv->initThread, g_free);
         }
-        if (priv->th) {
-            virThreadJoin(priv->th);
-            g_clear_pointer(&priv->th, g_free);
+        if (priv->udevThread) {
+            virThreadJoin(priv->udevThread);
+            g_clear_pointer(&priv->udevThread, g_free);
         }
     }
 
@@ -2335,12 +2335,12 @@ nodeStateInitialize(bool privileged,
         udev_monitor_set_receive_buffer_size(priv->udev_monitor,
                                              128 * 1024 * 1024);
 
-    priv->th = g_new0(virThread, 1);
-    if (virThreadCreateFull(priv->th, true, udevEventHandleThread,
+    priv->udevThread = g_new0(virThread, 1);
+    if (virThreadCreateFull(priv->udevThread, true, udevEventHandleThread,
                             "udev-event", false, NULL) < 0) {
         virReportSystemError(errno, "%s",
                              _("failed to create udev handler thread"));
-        g_clear_pointer(&priv->th, g_free);
+        g_clear_pointer(&priv->udevThread, g_free);
         goto unlock;
     }
 
-- 
2.34.1
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux