From: acevest Date: Sat, 27 Nov 2021 03:53:09 +0000 (+0800) Subject: 将wait_queue_head_t的定义移回wait.h X-Git-Url: http://zhaoyanbai.com/repos/man.rndc.html?a=commitdiff_plain;h=f2fcdb1c4b9b2a80304e228e48143295439a5733;p=kernel.git 将wait_queue_head_t的定义移回wait.h --- diff --git a/include/task.h b/include/task.h index ac27a6a..6b8e1d9 100644 --- a/include/task.h +++ b/include/task.h @@ -22,6 +22,7 @@ #include #include #include +#include enum { TASK_UNUSED, @@ -34,10 +35,6 @@ enum { #define TASK_NAME_SIZE 32 -typedef struct wait_queue_head { - list_head_t task_list; -} wait_queue_head_t; - typedef union task_union { struct { unsigned long esp0; /* kernel stack */ diff --git a/include/wait.h b/include/wait.h index 6e9d03c..f985f9a 100644 --- a/include/wait.h +++ b/include/wait.h @@ -14,10 +14,15 @@ #include #include -#include + +union task_union; + +typedef struct wait_queue_head { + list_head_t task_list; +} wait_queue_head_t; typedef struct { - task_union *task; + union task_union *task; list_head_t task_list; } wait_queue_t;