Navigation Menu

Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
windows: stdio over non-overlapped pipes
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Zinkovsky committed Oct 20, 2011
1 parent e8a418e commit c9697a6
Show file tree
Hide file tree
Showing 12 changed files with 576 additions and 59 deletions.
19 changes: 15 additions & 4 deletions include/uv-private/uv-win.h
Expand Up @@ -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;

This comment has been minimized.

Copy link
@piscisaureus

piscisaureus Oct 20, 2011

Is it not possible to just use next_req for this?

This comment has been minimized.

Copy link
@igorzi

igorzi Oct 20, 2011

Yeah, i think it should be possible. I was just being paranoid.


#define UV_CONNECT_PRIVATE_FIELDS \
/* empty */
Expand All @@ -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; \
Expand All @@ -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 }; \
Expand Down Expand Up @@ -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; \
Expand Down
1 change: 1 addition & 0 deletions src/win/internal.h
Expand Up @@ -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);
Expand Down

0 comments on commit c9697a6

Please sign in to comment.