#include "hud/hud_private.h"
#include "util/list.h"
#include "util/os_time.h"
+#include "util/simple_mtx.h"
#include "util/u_thread.h"
#include "util/u_memory.h"
#include "util/u_string.h"
*/
static int gsensors_temp_count = 0;
static struct list_head gsensors_temp_list;
-static mtx_t gsensor_temp_mutex = _MTX_INITIALIZER_NP;
+static simple_mtx_t gsensor_temp_mutex = SIMPLE_MTX_INITIALIZER;
struct sensors_temp_info
{
hud_get_num_sensors(bool displayhelp)
{
/* Return the number of sensors detected. */
- mtx_lock(&gsensor_temp_mutex);
+ simple_mtx_lock(&gsensor_temp_mutex);
if (gsensors_temp_count) {
- mtx_unlock(&gsensor_temp_mutex);
+ simple_mtx_unlock(&gsensor_temp_mutex);
return gsensors_temp_count;
}
int ret = sensors_init(NULL);
if (ret) {
- mtx_unlock(&gsensor_temp_mutex);
+ simple_mtx_unlock(&gsensor_temp_mutex);
return 0;
}
}
}
- mtx_unlock(&gsensor_temp_mutex);
+ simple_mtx_unlock(&gsensor_temp_mutex);
return gsensors_temp_count;
}