summaryrefslogtreecommitdiffstats
path: root/include/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/object.h')
-rw-r--r--include/object.h22
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