diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-10 15:40:19 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-10 15:40:19 -0400 |
commit | c4f8ef91f18d854a4ede7a94e95b2eab898d6963 (patch) | |
tree | c2772c4f380a684b6fa347f03b13f9476bf9500c /include/object.h | |
parent | b905869a35f062a4e5072f10bec3a2ba3db0e365 (diff) | |
download | jove-kernel-c4f8ef91f18d854a4ede7a94e95b2eab898d6963.tar.gz jove-kernel-c4f8ef91f18d854a4ede7a94e95b2eab898d6963.tar.bz2 jove-kernel-c4f8ef91f18d854a4ede7a94e95b2eab898d6963.zip |
working usermode objdir iteration
Diffstat (limited to 'include/object.h')
-rw-r--r-- | include/object.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/include/object.h b/include/object.h index 0a71b5f..190b082 100644 --- a/include/object.h +++ b/include/object.h @@ -14,11 +14,9 @@ enum KO_OBJECT_DIRECTORY, KO_INIT_DATA, KO_MEMORY_UNTYPED, - KO_MEMORY_MAPPED_PAGE, //4KiB Fixed Width - KO_MEMORY_MAPPING_PAGE, //4Kib Fixed Width + KO_MEMORY_MAPPING, //4KiB aligned fixed width KO_INITRD_FILE, KO_TCB, - KO_KERNEL_STACK, KO_MESSAGE, /* Device objects*/ KO_DEV_INVALID = 0x100, @@ -26,7 +24,10 @@ enum KO_DEV_UART }; -typedef uintmax_t obj_path_t; +#define KO_MESSAGE_BYTES 4096 +#define KO_MESSAGE_ALIGN 0x1000 + +typedef uint8_t path_byte_t; typedef uint16_t obj_type_t; typedef struct jove_ObjectDirectoryEntry @@ -34,10 +35,9 @@ typedef struct jove_ObjectDirectoryEntry obj_type_t type; union { struct { - char lock : 1; - char u0 : 7; - char u1; -}; + unsigned char lock; + char u0; + }; unsigned short flg; }; uintmax_t data; @@ -45,9 +45,6 @@ typedef struct jove_ObjectDirectoryEntry #define OBJECT_DIRECTORY_MAX_ENTRIES 256 -//The first entry always represents itself, which allows the kernel to ignore -//some checks. -//The data variable also contains the next free index for this directory. typedef struct jove_ObjectDirectory { union { @@ -56,6 +53,7 @@ typedef struct jove_ObjectDirectory }; } objdir_t; -objdir_entry_t *objdir_seek(objdir_t *dir, uintmax_t index); +objdir_entry_t *objdir_seek(objdir_t *dir, uint8_t *path, unsigned long pathw); +unsigned long objdir_pathw(objdir_t *dir, uint8_t *path); #endif |