commit 11476d83c9218ad2b22ab59b2fee3a4a4bf36367 (tree)
parent 922ab8b8bc3b6dc14da9393b65ca2601f9a82728
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sun, 1 Feb 2026 22:32:48 -0800
stage1: add wasi_snapshot_preview1_clock_res_get to wasi.c
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/stage1/wasi.c b/stage1/wasi.c
@@ -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];