Skip to content

Commit 27ee557

Browse files
committed
expose wasi_copyin/copyout
copyout might be used for wasi-threads.
1 parent 1ac8557 commit 27ee557

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/wasi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ fdinfo_is_prestat(const struct wasi_fdinfo *fdinfo)
212212
return fdinfo->hostfd == -1 && fdinfo->prestat_path != NULL;
213213
}
214214

215-
static int
215+
int
216216
wasi_copyin(struct exec_context *ctx, void *hostaddr, uint32_t wasmaddr,
217217
size_t len)
218218
{
@@ -226,7 +226,7 @@ wasi_copyin(struct exec_context *ctx, void *hostaddr, uint32_t wasmaddr,
226226
return 0;
227227
}
228228

229-
static int
229+
int
230230
wasi_copyout(struct exec_context *ctx, const void *hostaddr, uint32_t wasmaddr,
231231
size_t len)
232232
{

lib/wasi_impl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@
2323
#endif
2424

2525
uint32_t wasi_convert_errno(int host_errno);
26+
int wasi_copyout(struct exec_context *ctx, const void *hostaddr,
27+
uint32_t wasmaddr, size_t len);
28+
int wasi_copyin(struct exec_context *ctx, void *hostaddr, uint32_t wasmaddr,
29+
size_t len);

0 commit comments

Comments
 (0)