summaryrefslogtreecommitdiff
path: root/deps/uv/src/win/req-inl.h
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <saghul@gmail.com>2015-05-06 09:46:15 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2015-05-06 23:08:52 +0200
commit04cc03b0292d062a657da9c56a1442bde5e4fa0a (patch)
tree0cdab3619e0776c00aa0cbb65c5571f2bed3d5ce /deps/uv/src/win/req-inl.h
parent0c8f13df8faa46714707581d97b237c0c4e6b157 (diff)
downloadandroid-node-v8-04cc03b0292d062a657da9c56a1442bde5e4fa0a.tar.gz
android-node-v8-04cc03b0292d062a657da9c56a1442bde5e4fa0a.tar.bz2
android-node-v8-04cc03b0292d062a657da9c56a1442bde5e4fa0a.zip
deps: update libuv to 1.5.0
Fixes: https://github.com/iojs/io.js/issues/1397 Fixes: https://github.com/iojs/io.js/issues/1512 Fixes: https://github.com/iojs/io.js/issues/1621 Fixes: https://github.com/iojs/io.js/issues/862 PR-URL: https://github.com/iojs/io.js/pull/1646 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/uv/src/win/req-inl.h')
-rw-r--r--deps/uv/src/win/req-inl.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/deps/uv/src/win/req-inl.h b/deps/uv/src/win/req-inl.h
index 46c7d9b106..b5e502eef5 100644
--- a/deps/uv/src/win/req-inl.h
+++ b/deps/uv/src/win/req-inl.h
@@ -29,7 +29,7 @@
#define SET_REQ_STATUS(req, status) \
- (req)->overlapped.Internal = (ULONG_PTR) (status)
+ (req)->u.io.overlapped.Internal = (ULONG_PTR) (status)
#define SET_REQ_ERROR(req, error) \
SET_REQ_STATUS((req), NTSTATUS_FROM_WIN32((error)))
@@ -38,7 +38,7 @@
SET_REQ_STATUS((req), STATUS_SUCCESS)
#define GET_REQ_STATUS(req) \
- ((NTSTATUS) (req)->overlapped.Internal)
+ ((NTSTATUS) (req)->u.io.overlapped.Internal)
#define REQ_SUCCESS(req) \
(NT_SUCCESS(GET_REQ_STATUS((req))))
@@ -74,7 +74,7 @@
if (!PostQueuedCompletionStatus((loop)->iocp, \
0, \
0, \
- &((req)->overlapped))) { \
+ &((req)->u.io.overlapped))) { \
uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus"); \
}
@@ -86,13 +86,24 @@ INLINE static void uv_req_init(uv_loop_t* loop, uv_req_t* req) {
INLINE static uv_req_t* uv_overlapped_to_req(OVERLAPPED* overlapped) {
- return CONTAINING_RECORD(overlapped, uv_req_t, overlapped);
+ return CONTAINING_RECORD(overlapped, uv_req_t, u.io.overlapped);
}
INLINE static void uv_insert_pending_req(uv_loop_t* loop, uv_req_t* req) {
req->next_req = NULL;
if (loop->pending_reqs_tail) {
+#ifdef _DEBUG
+ /* Ensure the request is not already in the queue, or the queue
+ * will get corrupted.
+ */
+ uv_req_t* current = loop->pending_reqs_tail;
+ do {
+ assert(req != current);
+ current = current->next_req;
+ } while(current != loop->pending_reqs_tail);
+#endif
+
req->next_req = loop->pending_reqs_tail->next_req;
loop->pending_reqs_tail->next_req = req;
loop->pending_reqs_tail = req;