blob: 3f7331fdadcd84a2e78dcd1202b9772e068f96b8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "sys/lockstack.h"
#ifndef _JOVE_SYS_LINK_HPP
#define _JOVE_SYS_LINK_HPP 1
#include "hal/obj.h"
struct obj_link
{
jove_obj_t obj;
uint16_t refcount;
uint8_t permissions;
};
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_owned_obj_t *link_try_deref(jove_owned_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);
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
|