diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-26 17:11:50 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-26 17:11:50 -0400 |
| commit | 5f813d49a08cf3c3f8cf6c422cfb6587df575f62 (patch) | |
| tree | bd8872ee24580614b3eb845e1de26d465b025a09 /sys/link.h | |
| parent | b6765812f7da9feccc271e8e0b06f166e8054386 (diff) | |
| download | jove-kernel-5f813d49a08cf3c3f8cf6c422cfb6587df575f62.tar.gz jove-kernel-5f813d49a08cf3c3f8cf6c422cfb6587df575f62.tar.bz2 jove-kernel-5f813d49a08cf3c3f8cf6c422cfb6587df575f62.zip | |
add docs for syscalls. make syscall code kind-of cleaner
Diffstat (limited to 'sys/link.h')
| -rw-r--r-- | sys/link.h | 24 |
1 files changed, 18 insertions, 6 deletions
@@ -1,3 +1,4 @@ +#include "sys/lockstack.h" #ifndef _JOVE_SYS_LINK_HPP #define _JOVE_SYS_LINK_HPP 1 @@ -5,17 +6,28 @@ struct obj_link { - size_t refcount; jove_obj_t obj; + uint16_t refcount; + uint8_t permissions; }; -void *obj_deref_linked(jove_owned_obj_t *obj); -uint8_t obj_gettype_linked(jove_owned_obj_t *obj); -uint64_t obj_getvalue_linked(jove_owned_obj_t *obj); +typedef struct obj_perm_group +{ + jove_owned_obj_t *obj; + 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); jove_owned_obj_t *link_deref(jove_owned_obj_t *link); -jove_obj_t link_unlink(jove_owned_obj_t *link); +jove_owned_obj_t *link_try_deref(jove_owned_obj_t *link); -jove_owned_obj_t *link_new(jove_obj_t *tgt, jove_owned_obj_t *dst); +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); + +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); #endif |
