diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-19 11:06:32 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-19 11:06:32 -0400 |
| commit | 44f9642bfc9ce9f740d508670befb569e06621a2 (patch) | |
| tree | ff64ec6fd0562b4b9e6ba665fceeec52f2371840 /hal/obj.c | |
| parent | b2920331b103d43793ac8be927a80a593ce0be5a (diff) | |
| download | jove-kernel-44f9642bfc9ce9f740d508670befb569e06621a2.tar.gz jove-kernel-44f9642bfc9ce9f740d508670befb569e06621a2.tar.bz2 jove-kernel-44f9642bfc9ce9f740d508670befb569e06621a2.zip | |
Diffstat (limited to 'hal/obj.c')
| -rw-r--r-- | hal/obj.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/hal/obj.c b/hal/obj.c new file mode 100644 index 0000000..5d1b9d7 --- /dev/null +++ b/hal/obj.c @@ -0,0 +1,23 @@ +#include "obj.h" + +static const char *s_typenames[] = { + [JOVE_OBJ_NONE] = "NONE", + [JOVE_OBJ_UNTYPED] = "UNTYPED", + [JOVE_OBJ_OBJDIR] = "OBJDIR", + [JOVE_OBJ_PAGEDIR] = "PAGEDIR", + [JOVE_OBJ_PROCESSOR] = "PROCESSOR", + [JOVE_OBJ_REGION] = "REGION", + [JOVE_OBJ_SHMEMORY] = "SHMEMORY", + [JOVE_OBJ_INT_HANDLE] = "INT_HANDLES", + [JOVE_OBJ_PCB] = "PCB", + [JOVE_OBJ_MESSAGE] = "MESSAGE", + [JOVE_OBJ_LINK] = "LINK" +}; + +const char* +obj_gettypename(jove_owned_obj_t *obj) +{ + uint8_t type = obj_gettype(obj); + if(type > JOVE_OBJ_LINK) return "UNKNOWN"; + return s_typenames[type]; +} |
