aboutsummaryrefslogtreecommitdiff
path: root/system/libraries/io/types.zig
blob: 1b4336b2a0bdcce1ade363bcd0387c3e161d196b (plain)
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
//! I/O types and constants

pub const Error = error{
    NotFound,
    PermissionDenied,
    InvalidDescriptor,
    ReadFailed,
    WriteFailed,
    InvalidLocation,
    SendFailed,
    GetLocationFailed,
};

pub const Descriptor = u32;

pub const source: Descriptor = 0;
pub const stream: Descriptor = 1;
pub const trace: Descriptor = 2;

pub const VIEW_ONLY: u32 = 0x01;
pub const MARK_ONLY: u32 = 0x02;
pub const BOTH: u32 = 0x03;
pub const CREATE: u32 = 0x0100;

pub const StackEntry = extern struct {
    identity: [64]u8,
    identity_len: u8,
    is_stack: bool,
    owner_name_len: u8,
    permission_type: u8,
    size: u32,
    modified_time: u64,
    owner_name: [64]u8,
};

pub const Letter = struct {
    pub const NONE: u8 = 0;
    pub const NAVIGATE: u8 = 1;
};