From ad541c67761b8aa6da1566802c347cac4018d0c2 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 2 Nov 2026 20:50:24 +0100 Subject: Move the build sources into src/ --- ot_worker.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 ot_worker.h (limited to 'ot_worker.h') diff --git a/ot_worker.h b/ot_worker.h deleted file mode 100644 index 4954773..0000000 --- a/ot_worker.h +++ /dev/null @@ -1,37 +0,0 @@ -/* This software was written by Dirk Engling - It is considered beerware. Prost. Skol. Cheers or whatever. */ - -#ifndef OT_WORKER_H__ -#define OT_WORKER_H__ - -#include -#include -#include - -#include "trackerlogic.h" - -struct ot_worker; - -/* What a worker does between being started and being told to stop. It reads - worker->sock and works out of worker->ws; everything around it, from the - buffers to the counters to saying goodbye, is handled here. */ -typedef void (*ot_worker_run)(struct ot_worker *worker); - -/* A thread that serves requests on a socket of its own, with the buffers and - counters it needs. Each is allocated on its own, so taking on another one - never moves the record a running worker holds. */ -struct ot_worker { - pthread_t thread; - _Atomic int left; - int64_t sock; - ot_worker_run run; - struct ot_workstruct ws; -}; - -/* Start one. Returns -1 if it could not be started. */ -int worker_start(ot_worker_run run, int64_t sock); - -/* Wake every worker until it has left, then join it */ -void worker_stop_all(void); - -#endif -- cgit v1.3