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/link.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'sys/link.h') diff --git a/sys/link.h b/sys/link.h index d4bc8d8..5659101 100644 --- a/sys/link.h +++ b/sys/link.h @@ -4,12 +4,9 @@ #include "hal/obj.h" -struct obj_link -{ - jove_obj_t obj; - uint16_t refcount; - uint8_t permissions; -}; +#ifdef __x86_64__ +#include "arch/x86_64/sys/link.h" +#endif typedef struct obj_perm_group { @@ -17,12 +14,14 @@ typedef struct obj_perm_group uint8_t permissions; } jove_perm_obj_t; -uint8_t link_gettype(jove_owned_obj_t *obj); -uint8_t link_getperm(jove_owned_obj_t *link); -uint64_t link_getvalue(jove_owned_obj_t *obj); +uint8_t link_getperm(jove_link_obj_t *link); +void link_setperm(jove_link_obj_t *link, uint8_t perm); + +void link_lock(jove_link_obj_t *link); +void link_unlock(jove_link_obj_t *link); -jove_owned_obj_t *link_deref(jove_owned_obj_t *link); -jove_owned_obj_t *link_try_deref(jove_owned_obj_t *link); +jove_owned_obj_t *link_deref(jove_link_obj_t *link); +jove_owned_obj_t *link_try_deref(jove_link_obj_t *link); jove_perm_obj_t link_traverse(jove_owned_obj_t *link, lockstack_t *lockstack); jove_perm_obj_t link_try_traverse(jove_owned_obj_t *link, lockstack_t *lockstack); @@ -34,6 +33,7 @@ jove_perm_obj_t link_try_traverse_objdir(jove_owned_obj_t *objdir, lockstack_t *lockstack, size_t pathlen, objpath_part_t *path); jove_obj_t link_unlink(jove_owned_obj_t *link); -jove_owned_obj_t *link_new(jove_obj_t *tgt, jove_owned_obj_t *dst, uint16_t permissions); +int link_new(jove_owned_obj_t *target_obj, jove_owned_obj_t *untyped_obj, uint8_t permissions); +int link_dup(jove_owned_obj_t *link_obj, jove_owned_obj_t *dest_obj); #endif -- cgit v1.2.3