gallium/util: replace pipe_mutex_lock() with mtx_lock()
[mesa.git] / src / gallium / auxiliary / hud / hud_nic.c
index f9935dea8b7218915cc42120d76654333ba2f883..ab74436ee20e42b373841d794bf2a4cf6a42f656 100644 (file)
@@ -67,7 +67,7 @@ struct nic_info
  */
 static int gnic_count = 0;
 static struct list_head gnic_list;
-pipe_static_mutex(gnic_mutex);
+static mtx_t gnic_mutex = _MTX_INITIALIZER_NP;
 
 static struct nic_info *
 find_nic_by_name(const char *n, int mode)
@@ -263,11 +263,11 @@ hud_nic_graph_install(struct hud_pane *pane, const char *nic_name,
 
    nic->mode = mode;
    if (nic->mode == NIC_DIRECTION_RX) {
-      snprintf(gr->name, sizeof(gr->name), "%s-rx-%lldMbps", nic->name,
+      snprintf(gr->name, sizeof(gr->name), "%s-rx-%"PRId64"Mbps", nic->name,
          nic->speedMbps);
    }
    else if (nic->mode == NIC_DIRECTION_TX) {
-      snprintf(gr->name, sizeof(gr->name), "%s-tx-%lldMbps", nic->name,
+      snprintf(gr->name, sizeof(gr->name), "%s-tx-%"PRId64"Mbps", nic->name,
          nic->speedMbps);
    }
    else if (nic->mode == NIC_RSSI_DBM)
@@ -331,7 +331,7 @@ hud_get_num_nics(bool displayhelp)
    char name[64];
 
    /* Return the number if network interfaces. */
-   pipe_mutex_lock(gnic_mutex);
+   mtx_lock(&gnic_mutex);
    if (gnic_count) {
       pipe_mutex_unlock(gnic_mutex);
       return gnic_count;