From df9270ef134498d4fffb921286375137d3639ae5 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Mon, 12 Feb 2024 01:26:33 -0500 Subject: Replace kernel header includes in include/mach/mach_types.h with forward declarations. I was trying to reuse TASK_NAME_SIZE in kern/thread.h but it was impossible because files included from kern/task.h end up requiring kern/thread.h (through percpu.h), creating a recursive dependency. With this change, mach_types.h only defines forward declarations and modules have to explicitly include the appropriate header file if they want to be able touch those structures. Most of the other includes are required because we no longer grab many different includes through mach_types.h. Message-ID: <20240212062634.1082207-1-flaviocruz@gmail.com> --- i386/i386/machine_task.c | 1 + i386/i386/percpu.h | 2 +- i386/i386/trap.h | 1 + i386/i386at/int_init.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) (limited to 'i386') diff --git a/i386/i386/machine_task.c b/i386/i386/machine_task.c index d592838a..8bebf368 100644 --- a/i386/i386/machine_task.c +++ b/i386/i386/machine_task.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/i386/i386/percpu.h b/i386/i386/percpu.h index 86b0a315..637d2ca6 100644 --- a/i386/i386/percpu.h +++ b/i386/i386/percpu.h @@ -66,7 +66,7 @@ MACRO_END #endif #include -#include +#include struct percpu { struct percpu *self; diff --git a/i386/i386/trap.h b/i386/i386/trap.h index e82164d0..db222737 100644 --- a/i386/i386/trap.h +++ b/i386/i386/trap.h @@ -30,6 +30,7 @@ #include #ifndef __ASSEMBLER__ +#include #include char *trap_name(unsigned int trapnum); diff --git a/i386/i386at/int_init.c b/i386/i386at/int_init.c index 262bef1b..5c8fce6d 100644 --- a/i386/i386at/int_init.c +++ b/i386/i386at/int_init.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #ifdef APIC -- cgit v1.2.3