summaryrefslogtreecommitdiffstats
path: root/api/obj.h
blob: c5a4e6e1a093063fd6bd763e2a5ef850b5289d14 (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
34
35
36
37
38
39
40
#ifndef _JOVE_API_OBJ_H
#define _JOVE_API_OBJ_H 1

typedef unsigned char objtype_t;
typedef unsigned short objpath_part_t;

enum
{
    JOVE_OBJ_NONE = 0,
    JOVE_OBJ_UNTYPED,
    JOVE_OBJ_OBJDIR,
    JOVE_OBJ_PAGEDIR,
    JOVE_OBJ_PROCESSOR,
    JOVE_OBJ_REGION,
    JOVE_OBJ_SHMEMORY,
    JOVE_OBJ_INT_HANDLE,
    JOVE_OBJ_PCB,
    JOVE_OBJ_MESSAGE,
    JOVE_OBJ_LINK,
};


/*Link can read object states and map page frames as read only*/
#define JOVE_PERM_READ 1
/*Link can write object states and map page frames as writeable*/
#define JOVE_PERM_WRITE 2
/*Link can untype linked objects, split untyped memory, and retype untyped linked object.*/
#define JOVE_PERM_MUTATE 4

#define JOVE_PERM_ALL 7

#define OBJDIR_SIZE 0x1000
#define OBJDIR_ENTRIES (OBJDIR_SIZE / sizeof(uintmax_t))

#define SHMEMORY_MAX_PAGES 0xFFF

#define MESSAGE_ALIGN 0x1000
#define MESSAGE_SIZE 0x1000

#endif