From 548506392b789f58b1556a6ffca917441e1d89fd Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Tue, 13 Oct 2026 22:31:43 -0400 Subject: ipc functions. work on process spawning --- sys/objdir.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'sys/objdir.c') diff --git a/sys/objdir.c b/sys/objdir.c index f956309..5b59ddc 100644 --- a/sys/objdir.c +++ b/sys/objdir.c @@ -4,16 +4,15 @@ #include "hal/obj.h" #include "lib/string.h" #include "jove.h" -#include int objdir_new(jove_owned_obj_t *untyped_obj) { jove_untyped_t *untyped = obj_deref(untyped_obj); - if((uintptr_t)untyped & (JOVE_OBJDIR_SIZE - 1)) return -EALIGN; - if(untyped->limit != JOVE_OBJDIR_SIZE) return -EBADSIZE; + if((uintptr_t)untyped & (OBJDIR_SIZE - 1)) return -EALIGN; + if(untyped->limit != OBJDIR_SIZE) return -EBADSIZE; - memset(untyped, 0, JOVE_OBJDIR_SIZE); + memset(untyped, 0, OBJDIR_SIZE); obj_settype(untyped_obj, JOVE_OBJ_OBJDIR); return 0; } @@ -27,7 +26,7 @@ objdir_peeklocal( errno = EBADOBJ; return (jove_obj_t) { 0 }; } - if(entry >= JOVE_OBJDIR_ENTRIES) { + if(entry >= OBJDIR_ENTRIES) { errno = EBADPATH; return (jove_obj_t) { 0 }; } @@ -44,7 +43,7 @@ objdir_getlocal( if(obj_gettype(objdir_obj) != JOVE_OBJ_OBJDIR) { reterr(EBADOBJ); } - if(entry >= JOVE_OBJDIR_ENTRIES) { + if(entry >= OBJDIR_ENTRIES) { reterr(EBADPATH); } @@ -60,7 +59,7 @@ objdir_trygetlocal( if(obj_gettype(objdir_obj) != JOVE_OBJ_OBJDIR) { reterr(EBADOBJ); } - if(entry >= JOVE_OBJDIR_ENTRIES) { + if(entry >= OBJDIR_ENTRIES) { reterr(EBADPATH); } -- cgit v1.2.3