summaryrefslogtreecommitdiffstats
path: root/sys/link.h
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2026-10-13 22:31:43 -0400
committerJon Santmyer <jon@jonsantmyer.com>2026-10-13 22:31:43 -0400
commit548506392b789f58b1556a6ffca917441e1d89fd (patch)
tree58e4b747446ea64e7951e523353f58510b3a8b2f /sys/link.h
parentc5e3bb7917689bc9ed54fee23a143144fade802d (diff)
downloadjove-kernel-548506392b789f58b1556a6ffca917441e1d89fd.tar.gz
jove-kernel-548506392b789f58b1556a6ffca917441e1d89fd.tar.bz2
jove-kernel-548506392b789f58b1556a6ffca917441e1d89fd.zip
ipc functions. work on process spawning
Diffstat (limited to 'sys/link.h')
-rw-r--r--sys/link.h24
1 files changed, 12 insertions, 12 deletions
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