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
This commit is contained in:
Mark Johnston 2024-07-08 12:26:35 -04:00
parent 713c77b927
commit bea256f3c5
2 changed files with 10 additions and 8 deletions

View File

@ -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);

View File

@ -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,