From 5b25f89d00433f1c11576d1ea19304797dc60d1b Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 31 Oct 2026 18:48:00 +0100 Subject: Refactor ot_workqueue out of ot_mutex, no behaviour change --- ot_stats.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ot_stats.c') diff --git a/ot_stats.c b/ot_stats.c index 5f97a2f..d38355a 100644 --- a/ot_stats.c +++ b/ot_stats.c @@ -23,6 +23,7 @@ #include "ot_iovec.h" #include "ot_ip.h" #include "ot_mutex.h" +#include "ot_workqueue.h" #include "ot_fmt.h" #include "ot_stats.h" #include "trackerlogic.h" @@ -803,17 +804,17 @@ static void *stats_worker(void *args) { while (g_opentracker_running) { ot_tasktype tasktype = TASK_STATS; - ot_taskid taskid = mutex_workqueue_poptask(&tasktype); + ot_taskid taskid = workqueue_poptask(&tasktype); if (!taskid) break; stats_make(&iovec_entries, &iovector, tasktype); - if (mutex_workqueue_pushresult(taskid, iovec_entries, iovector)) + if (workqueue_pushresult(taskid, iovec_entries, iovector)) iovec_free(&iovec_entries, &iovector); } return NULL; } -void stats_deliver(int64_t sock, int tasktype) { mutex_workqueue_pushtask(sock, tasktype); } +void stats_deliver(int64_t sock, int tasktype) { workqueue_pushtask(sock, tasktype); } static pthread_t thread_id; void stats_init(void) { @@ -822,6 +823,6 @@ void stats_init(void) { } void stats_deinit(void) { - mutex_workqueue_wakeall(); + workqueue_wakeall(); pthread_join(thread_id, NULL); } -- cgit v1.3