git: 7e32f871b7dd - stable/14 - taskqueue: Move the timeout_task definition to _task.h

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Mon, 15 Jul 2024 13:39:16 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=7e32f871b7dd522c2b1d649e8b9e4e7be9032b4a

commit 7e32f871b7dd522c2b1d649e8b9e4e7be9032b4a
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-07-08 16:26:35 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-07-15 13:39:06 +0000

    taskqueue: Move the timeout_task definition to _task.h
    
    So that timeout_task may be embedded into structures without pulling in
    too many other definitions.  No functional change intended.
    
    MFC after:      1 week
    Sponsored by:   Klara, Inc.
    Sponsored by:   Stormshield
    
    (cherry picked from commit bea256f3c5b9d9608278377576047bf0e591a4e7)
---
 sys/sys/_task.h     | 10 ++++++++++
 sys/sys/taskqueue.h |  8 --------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/sys/sys/_task.h b/sys/sys/_task.h
index 0e6f212990ec..86c68da8bab0 100644
--- a/sys/sys/_task.h
+++ b/sys/sys/_task.h
@@ -29,6 +29,7 @@
 #ifndef _SYS__TASK_H_
 #define _SYS__TASK_H_
 
+#include <sys/_callout.h>
 #include <sys/queue.h>
 
 /*
@@ -58,6 +59,15 @@ struct task {
 
 #define	TASK_IS_NET(ta)		((ta)->ta_flags & TASK_NETWORK)
 
+struct taskqueue;
+
+struct timeout_task {
+	struct taskqueue *q;
+	struct task t;
+	struct callout c;
+	int    f;
+};
+
 #ifdef _KERNEL
 
 typedef void gtask_fn_t(void *context);
diff --git a/sys/sys/taskqueue.h b/sys/sys/taskqueue.h
index 34d64a5042a6..9757e1fce575 100644
--- a/sys/sys/taskqueue.h
+++ b/sys/sys/taskqueue.h
@@ -35,7 +35,6 @@
 
 #include <sys/queue.h>
 #include <sys/_task.h>
-#include <sys/_callout.h>
 #include <sys/_cpuset.h>
 
 struct taskqueue;
@@ -43,13 +42,6 @@ struct taskqgroup;
 struct proc;
 struct thread;
 
-struct timeout_task {
-	struct taskqueue *q;
-	struct task t;
-	struct callout c;
-	int    f;
-};
-
 enum taskqueue_callback_type {
 	TASKQUEUE_CALLBACK_TYPE_INIT,
 	TASKQUEUE_CALLBACK_TYPE_SHUTDOWN,