*/
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)
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)
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;