1 #ifndef __UVWASI_SYNC_HELPERS_H__ 2 #define __UVWASI_SYNC_HELPERS_H__ 3 4 struct uvwasi_s; 5 6 typedef struct shutdown_data_s { 7 int status; 8 int done; 9 } shutdown_data_t; 10 11 typedef struct recv_data_s { 12 char* base; 13 size_t len; 14 ssize_t nread; 15 int done; 16 } recv_data_t; 17 18 int free_handle_sync(struct uvwasi_s* uvwasi, uv_handle_t* handle); 19 20 int shutdown_stream_sync(struct uvwasi_s* uvwasi, 21 uv_stream_t* stream, 22 shutdown_data_t* shutdown_data); 23 24 int read_stream_sync(struct uvwasi_s* uvwasi, 25 uv_stream_t* stream, 26 recv_data_t* recv_data); 27 #endif /* __UVWASI_SYNC_HELPERS_H__ */ 28