stage1: add wasi_snapshot_preview1_clock_res_get to wasi.c

This commit is contained in:
Andrew Kelley 2026-02-01 22:32:48 -08:00
parent 922ab8b8bc
commit 11476d83c9

View file

@ -924,6 +924,15 @@ uint32_t wasi_snapshot_preview1_clock_time_get(uint32_t id, uint64_t precision,
return wasi_errno_success;
}
uint32_t wasi_snapshot_preview1_clock_res_get(uint32_t id, uint32_t res_timestamp) {
uint8_t *const m = *wasm_memory;
uint64_t *res_timestamp_ptr = (uint64_t *)&m[res_timestamp];
#if LOG_TRACE
fprintf(stderr, "wasi_snapshot_preview1_clock_res_get(%u, %llu)\n", id, (unsigned long long)res_timestamp);
#endif
return wasi_errno_notcapable;
}
uint32_t wasi_snapshot_preview1_path_remove_directory(uint32_t fd, uint32_t path, uint32_t path_len) {
uint8_t *const m = *wasm_memory;
const char *path_ptr = (const char *)&m[path];