Wed 22 Jan 12:17:36 CET 2025

This commit is contained in:
sbosse 2025-01-22 12:18:01 +01:00
parent 35812f60b8
commit e70722cb03

View File

@ -16,6 +16,14 @@
#include "pipe.h" #include "pipe.h"
#include "event.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 { struct kobject {
union { union {
struct device *device; struct device *device;
@ -24,6 +32,9 @@ struct kobject {
struct window *window; struct window *window;
struct console *console; struct console *console;
struct pipe *pipe; struct pipe *pipe;
#ifdef KERNEL_KOBJECT_EXT
KERNEL_KOBJECT_EXT_OBJECTS
#endif
} data; } data;
kobject_type_t type; kobject_type_t type;
int refcount; 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_set_tag(struct kobject *kobject, char *new_tag);
int kobject_get_tag(struct kobject *kobject, char *buffer, int buffer_size); int kobject_get_tag(struct kobject *kobject, char *buffer, int buffer_size);
#ifdef KERNEL_KOBJECT_EXT
KERNEL_KOBJECT_EXT_FUNCTIONS
#endif
#endif #endif