summaryrefslogtreecommitdiff
path: root/deps/uv/include/uv-win.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/uv/include/uv-win.h')
-rw-r--r--deps/uv/include/uv-win.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/deps/uv/include/uv-win.h b/deps/uv/include/uv-win.h
index 2f24dfe890..136b0b45de 100644
--- a/deps/uv/include/uv-win.h
+++ b/deps/uv/include/uv-win.h
@@ -30,6 +30,15 @@ typedef intptr_t ssize_t;
#endif
#include <winsock2.h>
+
+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
+typedef struct pollfd {
+ SOCKET fd;
+ short events;
+ short revents;
+} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
+#endif
+
#include <mswsock.h>
#include <ws2tcpip.h>
#include <windows.h>
@@ -45,6 +54,7 @@ typedef intptr_t ssize_t;
#endif
#include "tree.h"
+#include "uv-threadpool.h"
#define MAX_PIPENAME_LEN 256
@@ -307,7 +317,11 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
/* Counter to keep track of active udp streams */ \
unsigned int active_udp_streams; \
/* Counter to started timer */ \
- uint64_t timer_counter;
+ uint64_t timer_counter; \
+ /* Threadpool */ \
+ void* wq[2]; \
+ uv_mutex_t wq_mutex; \
+ uv_async_t wq_async;
#define UV_REQ_TYPE_PRIVATE \
/* TODO: remove the req suffix */ \
@@ -395,7 +409,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
#define UV_TCP_PRIVATE_FIELDS \
SOCKET socket; \
- int bind_error; \
+ int delayed_error; \
union { \
struct { uv_tcp_server_fields }; \
struct { uv_tcp_connection_fields }; \
@@ -520,6 +534,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
unsigned int flags;
#define UV_GETADDRINFO_PRIVATE_FIELDS \
+ struct uv__work work_req; \
uv_getaddrinfo_cb getaddrinfo_cb; \
void* alloc; \
WCHAR* node; \
@@ -529,6 +544,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
int retcode;
#define UV_GETNAMEINFO_PRIVATE_FIELDS \
+ struct uv__work work_req; \
uv_getnameinfo_cb getnameinfo_cb; \
struct sockaddr_storage storage; \
int flags; \
@@ -547,6 +563,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
volatile char exit_cb_pending;
#define UV_FS_PRIVATE_FIELDS \
+ struct uv__work work_req; \
int flags; \
DWORD sys_errno_; \
union { \
@@ -572,6 +589,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
};
#define UV_WORK_PRIVATE_FIELDS \
+ struct uv__work work_req;
#define UV_FS_EVENT_PRIVATE_FIELDS \
struct uv_fs_event_req_s { \