Permalink
Browse files

windows: stdio over non-overlapped pipes

  • Loading branch information...
1 parent e8a418e commit c9697a61f611695e06060417a120ecf82f3f6e4d Igor Zinkovsky committed Oct 19, 2011
Showing with 576 additions and 59 deletions.
  1. +15 −4 include/uv-private/uv-win.h
  2. +1 −0 src/win/internal.h
  3. +295 −47 src/win/pipe.c
  4. +2 −0 src/win/stream.c
  5. +4 −3 src/win/tcp.c
  6. +5 −5 src/win/tty.c
  7. +7 −0 src/win/winapi.h
  8. +88 −0 test/run-tests.c
  9. +2 −0 test/task.h
  10. +2 −0 test/test-list.h
  11. +154 −0 test/test-stdio-over-pipes.c
  12. +1 −0 uv.gyp
@@ -169,7 +169,11 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
struct uv_req_s* next_req;
#define UV_WRITE_PRIVATE_FIELDS \
- int ipc_header;
+ int ipc_header; \
+ uv_buf_t* write_buffer; \
+ HANDLE event_handle; \
+ HANDLE wait_handle; \
+ uv_write_t* next_non_overlapped_write;
#define UV_CONNECT_PRIVATE_FIELDS \
/* empty */
@@ -194,7 +198,13 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
HANDLE event_handle; \
HANDLE wait_handle; \
struct uv_tcp_accept_s* next_pending; \
- } uv_tcp_accept_t;
+ } uv_tcp_accept_t; \
+ \
+ typedef struct uv_read_s { \
+ UV_REQ_FIELDS \
+ HANDLE event_handle; \
+ HANDLE wait_handle; \
+ } uv_read_t;
#define uv_stream_connection_fields \
unsigned int write_reqs_pending; \
@@ -205,7 +215,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
#define UV_STREAM_PRIVATE_FIELDS \
unsigned int reqs_pending; \
- uv_req_t read_req; \
+ uv_read_t read_req; \
union { \
struct { uv_stream_connection_fields }; \
struct { uv_stream_server_fields }; \
@@ -247,7 +257,8 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
uv_write_t ipc_header_write_req; \
int ipc_pid; \
uint64_t remaining_ipc_rawdata_bytes; \
- WSAPROTOCOL_INFOW* pending_socket_info;
+ WSAPROTOCOL_INFOW* pending_socket_info; \
+ uv_write_t* non_overlapped_writes_tail;
#define UV_PIPE_PRIVATE_FIELDS \
HANDLE handle; \
View
@@ -65,6 +65,7 @@ void uv_process_timers(uv_loop_t* loop);
#define UV_HANDLE_ZERO_READ 0x40000
#define UV_HANDLE_TTY_RAW 0x80000
#define UV_HANDLE_EMULATE_IOCP 0x100000
+#define UV_HANDLE_NON_OVERLAPPED_PIPE 0x200000
void uv_want_endgame(uv_loop_t* loop, uv_handle_t* handle);
void uv_process_endgames(uv_loop_t* loop);
Oops, something went wrong.

0 comments on commit c9697a6

Please sign in to comment.