summaryrefslogtreecommitdiff
path: root/lib/thread.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2021-02-03 12:22:19 -0500
committerMark Stapp <mjs@voltanet.io>2021-02-09 12:10:51 -0500
commitaea25d1ec828226fa35af1b333d346883deefb28 (patch)
treead76708fce9fb9942e512f3b521f406218f4c21e /lib/thread.c
parentd887c7bf04f08b37ec122587f11cd2079cb22bd7 (diff)
libs: make the task cancellation struct private
No reason for the thread/task cancellation struct to be public: move it out of the header file. Also add a flags field. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/thread.c')
-rw-r--r--lib/thread.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/thread.c b/lib/thread.c
index c140c7600c..761edcafd4 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -45,6 +45,16 @@ DEFINE_MTYPE_STATIC(LIB, THREAD_STATS, "Thread stats")
DECLARE_LIST(thread_list, struct thread, threaditem)
+struct cancel_req {
+ int flags;
+ struct thread *thread;
+ void *eventobj;
+ struct thread **threadref;
+};
+
+/* Flags for task cancellation */
+#define THREAD_CANCEL_FLAG_READY 0x01
+
static int thread_timer_cmp(const struct thread *a, const struct thread *b)
{
if (a->u.sands.tv_sec < b->u.sands.tv_sec)