| ... | @@ -1,18 +1,28 @@ | ... | @@ -1,18 +1,28 @@ |
| | 1 | pub const clockid_t = u32; |
| 1 | pub const errno_t = u16; | 2 | pub const errno_t = u16; |
| 2 | pub const exitcode_t = u32; | 3 | pub const exitcode_t = u32; |
| 3 | pub const fd_t = u32; | 4 | pub const fd_t = u32; |
| 4 | pub const signal_t = u8; | 5 | pub const signal_t = u8; |
| | 6 | pub const timestamp_t = u64; |
| 5 | | 7 | |
| 6 | pub const ciovec_t = extern struct { | 8 | pub const ciovec_t = extern struct { |
| 7 | buf: [*]const u8, | 9 | buf: [*]const u8, |
| 8 | buf_len: usize, | 10 | buf_len: usize, |
| 9 | }; | 11 | }; |
| 10 | | 12 | |
| | 13 | pub const CLOCK_REALTIME = 0; |
| | 14 | pub const CLOCK_MONOTONIC = 1; |
| | 15 | pub const CLOCK_PROCESS_CPUTIME_ID = 2; |
| | 16 | pub const CLOCK_THREAD_CPUTIME_ID = 3; |
| | 17 | |
| 11 | pub const SIGABRT: signal_t = 6; | 18 | pub const SIGABRT: signal_t = 6; |
| 12 | | 19 | |
| 13 | pub extern "wasi_unstable" fn args_get(argv: [*][*]u8, argv_buf: [*]u8) errno_t; | 20 | pub extern "wasi_unstable" fn args_get(argv: [*][*]u8, argv_buf: [*]u8) errno_t; |
| 14 | pub extern "wasi_unstable" fn args_sizes_get(argc: *usize, argv_buf_size: *usize) errno_t; | 21 | pub extern "wasi_unstable" fn args_sizes_get(argc: *usize, argv_buf_size: *usize) errno_t; |
| 15 | | 22 | |
| | 23 | pub extern "wasi_unstable" fn clock_res_get(clock_id: clockid_t, resolution: *timestamp_t) errno_t; |
| | 24 | pub extern "wasi_unstable" fn clock_time_get(clock_id: clockid_t, precision: timestamp_t, timestamp: *timestamp_t) errno_t; |
| | 25 | |
| 16 | pub extern "wasi_unstable" fn environ_get(environ: [*]?[*]u8, environ_buf: [*]u8) errno_t; | 26 | pub extern "wasi_unstable" fn environ_get(environ: [*]?[*]u8, environ_buf: [*]u8) errno_t; |
| 17 | pub extern "wasi_unstable" fn environ_sizes_get(environ_count: *usize, environ_buf_size: *usize) errno_t; | 27 | pub extern "wasi_unstable" fn environ_sizes_get(environ_count: *usize, environ_buf_size: *usize) errno_t; |
| 18 | | 28 | |