diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2024-02-12 01:26:33 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-02-12 18:50:00 +0100 |
commit | df9270ef134498d4fffb921286375137d3639ae5 (patch) | |
tree | 1eb4ddb572f24fbc737a99c4c63d39fe6d2b3653 /i386 | |
parent | 2556fdece900d67529d5eda01f1bdaae4ffe96b0 (diff) | |
download | gnumach-df9270ef134498d4fffb921286375137d3639ae5.tar.gz gnumach-df9270ef134498d4fffb921286375137d3639ae5.tar.bz2 gnumach-df9270ef134498d4fffb921286375137d3639ae5.zip |
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>
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/machine_task.c | 1 | ||||
-rw-r--r-- | i386/i386/percpu.h | 2 | ||||
-rw-r--r-- | i386/i386/trap.h | 1 | ||||
-rw-r--r-- | i386/i386at/int_init.c | 1 |
4 files changed, 4 insertions, 1 deletions
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 <kern/lock.h> #include <mach/mach_types.h> #include <kern/slab.h> +#include <kern/task.h> #include <machine/task.h> #include <machine/io_perm.h> 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 <kern/processor.h> -#include <kern/thread.h> +#include <mach/mach_types.h> 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 <mach/machine/trap.h> #ifndef __ASSEMBLER__ +#include <i386/thread.h> #include <mach/mach_types.h> 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 <i386at/idt.h> #include <i386at/int_init.h> +#include <i386/gdt.h> #include <i386/mp_desc.h> #include <kern/printf.h> #ifdef APIC |