From e70722cb03118283408364dd366f62a6495ab4ae Mon Sep 17 00:00:00 2001 From: sbosse Date: Wed, 22 Jan 2025 12:18:01 +0100 Subject: [PATCH] Wed 22 Jan 12:17:36 CET 2025 --- kernel/kobject.h | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/kernel/kobject.h b/kernel/kobject.h index 6b9d2aa..2072a67 100644 --- a/kernel/kobject.h +++ b/kernel/kobject.h @@ -16,14 +16,25 @@ #include "pipe.h" #include "event.h" +#ifdef KERNEL_KOBJECT_EXT + #include "kernel_kobject_ext.h" +#endif + +/* + Kernel objects, hold, e.g., by processes + It is a wrapper structure for different kind of objects +*/ struct kobject { union { - struct device *device; - struct fs_dirent *file; - struct fs_dirent *dir; - struct window *window; - struct console *console; - struct pipe *pipe; + struct device *device; + struct fs_dirent *file; + struct fs_dirent *dir; + struct window *window; + struct console *console; + struct pipe *pipe; +#ifdef KERNEL_KOBJECT_EXT + KERNEL_KOBJECT_EXT_OBJECTS +#endif } data; kobject_type_t type; int refcount; @@ -60,4 +71,8 @@ int kobject_get_type(struct kobject *kobject); int kobject_set_tag(struct kobject *kobject, char *new_tag); int kobject_get_tag(struct kobject *kobject, char *buffer, int buffer_size); +#ifdef KERNEL_KOBJECT_EXT + KERNEL_KOBJECT_EXT_FUNCTIONS +#endif + #endif