@@ -26,10 +26,10 @@ index 0f5ddfb3ca21b7e5b38d0a4ce4b9e77387597199..ba815202fb157aa82859ec0518523cf6
26
26
.. c:function:: int uv_loop_close(uv_loop_t* loop)
27
27
28
28
diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
29
- index 02397dd0fdd43d51f86c0dde9a62046702f12bdb..3375600023e39ddacf62cc17deb4f206db942084 100644
29
+ index ee1c94ccd389915ea7572cce044256a7788025ad..d31abf714d5d1433ec8473ccb1aae3b6615c477a 100644
30
30
--- a/deps/uv/include/uv.h
31
31
+++ b/deps/uv/include/uv.h
32
- @@ -260 ,7 +260 ,8 @@ typedef struct uv_metrics_s uv_metrics_t ;
32
+ @@ -252 ,7 +252 ,8 @@ typedef struct uv_statfs_s uv_statfs_t ;
33
33
34
34
typedef enum {
35
35
UV_LOOP_BLOCK_SIGNAL = 0,
@@ -40,7 +40,7 @@ index 02397dd0fdd43d51f86c0dde9a62046702f12bdb..3375600023e39ddacf62cc17deb4f206
40
40
41
41
typedef enum {
42
42
diff --git a/deps/uv/src/unix/async.c b/deps/uv/src/unix/async.c
43
- index 0ff2669e30a628dbb2df9e28ba14b38cf14114e5..679b17bda476d2a9c072ce8261234f837b56422f 100644
43
+ index e1805c323795e5b0c465d80100eebeb7bf838caa..dd4358c0cdaa97ba8fadf4d9755993803beddd18 100644
44
44
--- a/deps/uv/src/unix/async.c
45
45
+++ b/deps/uv/src/unix/async.c
46
46
@@ -38,7 +38,6 @@
@@ -49,18 +49,18 @@ index 0ff2669e30a628dbb2df9e28ba14b38cf14114e5..679b17bda476d2a9c072ce8261234f83
49
49
50
50
- static void uv__async_send(uv_loop_t* loop);
51
51
static int uv__async_start(uv_loop_t* loop);
52
- static void uv__cpu_relax(void);
53
52
54
- @@ -78,7 +77,7 @@ int uv_async_send(uv_async_t* handle) {
53
+
54
+ @@ -70,7 +69,7 @@ int uv_async_send(uv_async_t* handle) {
55
+ return 0;
55
56
56
57
/* Wake up the other thread's event loop. */
57
- if (atomic_exchange(pending, 1) == 0)
58
- - uv__async_send(handle->loop);
59
- + uv__loop_interrupt(handle->loop);
58
+ - uv__async_send(handle->loop);
59
+ + uv__loop_interrupt(handle->loop);
60
60
61
- /* Set the loop to not-busy . */
62
- atomic_fetch_add(busy, -1);
63
- @@ -178 ,40 +177 ,6 @@ static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
61
+ /* Tell the other thread we're done . */
62
+ if (cmpxchgi(&handle->pending, 1, 2) != 1)
63
+ @@ -165 ,40 +164 ,6 @@ static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
64
64
}
65
65
66
66
@@ -102,10 +102,10 @@ index 0ff2669e30a628dbb2df9e28ba14b38cf14114e5..679b17bda476d2a9c072ce8261234f83
102
102
int pipefd[2];
103
103
int err;
104
104
diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c
105
- index 25c5181f370e94983e8a5f797f02f7a8dc207e00..f4d9059796d2c65339a5d48ecb273b09d9364d21 100644
105
+ index 54c769f37f2331136c87a37c13fb4e3f9a8f22f9..ac52ab79a5fc3050effd2b1f2f605cee9b1ab336 100644
106
106
--- a/deps/uv/src/unix/core.c
107
107
+++ b/deps/uv/src/unix/core.c
108
- @@ -926 ,6 +926 ,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
108
+ @@ -900 ,6 +900 ,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
109
109
loop->watchers[w->fd] = w;
110
110
loop->nfds++;
111
111
}
@@ -115,28 +115,28 @@ index 25c5181f370e94983e8a5f797f02f7a8dc207e00..f4d9059796d2c65339a5d48ecb273b09
115
115
}
116
116
117
117
118
- @@ -957 ,6 +960 ,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
118
+ @@ -931 ,6 +934 ,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
119
119
}
120
- else if (uv__queue_empty (&w->watcher_queue))
121
- uv__queue_insert_tail (&loop->watcher_queue, &w->watcher_queue);
120
+ else if (QUEUE_EMPTY (&w->watcher_queue))
121
+ QUEUE_INSERT_TAIL (&loop->watcher_queue, &w->watcher_queue);
122
122
+
123
123
+ if (uv__get_internal_fields(loop)->flags & UV_LOOP_INTERRUPT_ON_IO_CHANGE)
124
124
+ uv__loop_interrupt(loop);
125
125
}
126
126
127
127
128
- @@ -973 ,6 +979 ,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
128
+ @@ -947 ,6 +953 ,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
129
129
void uv__io_feed(uv_loop_t* loop, uv__io_t* w) {
130
- if (uv__queue_empty (&w->pending_queue))
131
- uv__queue_insert_tail (&loop->pending_queue, &w->pending_queue);
130
+ if (QUEUE_EMPTY (&w->pending_queue))
131
+ QUEUE_INSERT_TAIL (&loop->pending_queue, &w->pending_queue);
132
132
+
133
133
+ if (uv__get_internal_fields(loop)->flags & UV_LOOP_INTERRUPT_ON_IO_CHANGE)
134
134
+ uv__loop_interrupt(loop);
135
135
}
136
136
137
137
138
138
diff --git a/deps/uv/src/unix/loop.c b/deps/uv/src/unix/loop.c
139
- index a9468e8e19cbede795032980c47eb83aee1e0c68..2d28cf48efc3718de19b901b7e08b8a857d20740 100644
139
+ index a88e71c339351f2ebcdd6c3f933fc3b1122910ed..46fc03264b6cc1a3a4d8faf5ec5a754fc07c9b6d 100644
140
140
--- a/deps/uv/src/unix/loop.c
141
141
+++ b/deps/uv/src/unix/loop.c
142
142
@@ -217,6 +217,11 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
@@ -193,10 +193,10 @@ index a9468e8e19cbede795032980c47eb83aee1e0c68..2d28cf48efc3718de19b901b7e08b8a8
193
193
+ abort();
194
194
+ }
195
195
diff --git a/deps/uv/src/uv-common.h b/deps/uv/src/uv-common.h
196
- index cd57e5a35153d0557351b60cce0c5be7a4468b60..660caef30b1637b8009de5e55ee34f48d17e4dd0 100644
196
+ index 6001b0cf68d0b0268b578218b664a737f43c9521..5d2212571f4bcb648ab332f0c5650d0fdb37c03a 100644
197
197
--- a/deps/uv/src/uv-common.h
198
198
+++ b/deps/uv/src/uv-common.h
199
- @@ -144 ,6 +144 ,8 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap);
199
+ @@ -140 ,6 +140 ,8 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap);
200
200
201
201
void uv__loop_close(uv_loop_t* loop);
202
202
@@ -205,7 +205,7 @@ index cd57e5a35153d0557351b60cce0c5be7a4468b60..660caef30b1637b8009de5e55ee34f48
205
205
int uv__read_start(uv_stream_t* stream,
206
206
uv_alloc_cb alloc_cb,
207
207
uv_read_cb read_cb);
208
- @@ -280 ,6 +282 ,10 @@ void uv__threadpool_cleanup(void);
208
+ @@ -268 ,6 +270 ,10 @@ void uv__threadpool_cleanup(void);
209
209
if (((h)->flags & UV_HANDLE_ACTIVE) != 0) break; \
210
210
(h)->flags |= UV_HANDLE_ACTIVE; \
211
211
if (((h)->flags & UV_HANDLE_REF) != 0) uv__active_handle_add(h); \
@@ -217,7 +217,7 @@ index cd57e5a35153d0557351b60cce0c5be7a4468b60..660caef30b1637b8009de5e55ee34f48
217
217
while (0)
218
218
219
219
diff --git a/deps/uv/src/win/core.c b/deps/uv/src/win/core.c
220
- index e9885a0f1ff3890a8d957c8793e22b01cedc0e97..ae3d09878253fe7169ad7b74b3faea0223f89de5 100644
220
+ index 67af93e6571ed4324d80b6dfb2ff93db7b9cd9b1..e88008b6a288d1508c5c117d814000d63cab81c3 100644
221
221
--- a/deps/uv/src/win/core.c
222
222
+++ b/deps/uv/src/win/core.c
223
223
@@ -384,10 +384,20 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
@@ -242,7 +242,7 @@ index e9885a0f1ff3890a8d957c8793e22b01cedc0e97..ae3d09878253fe7169ad7b74b3faea02
242
242
return -1;
243
243
}
244
244
diff --git a/deps/uv/test/test-embed.c b/deps/uv/test/test-embed.c
245
- index bbe56e176db17a502d7f3864ba529212f553590a..b0da9d1cddc69428e9fb3379d1338cf893ab93d2 100644
245
+ index 1d3355fdc67310feb63738c9e30724f0e77f7895..77a63dbb4d188b2ad571c814dbc6cbc6fe5fa205 100644
246
246
--- a/deps/uv/test/test-embed.c
247
247
+++ b/deps/uv/test/test-embed.c
248
248
@@ -25,54 +25,184 @@
@@ -463,21 +463,21 @@ index bbe56e176db17a502d7f3864ba529212f553590a..b0da9d1cddc69428e9fb3379d1338cf8
463
463
+ run_loop();
464
464
+ ASSERT_EQ(main_timer_called, 1);
465
465
466
- MAKE_VALGRIND_HAPPY(loop );
466
+ MAKE_VALGRIND_HAPPY();
467
467
return 0;
468
468
diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h
469
- index 78ff9c2d1621676feab5d357609970cdf1ba5864..204160f324ad1a80c9b042e62c4bedcb745666ba 100644
469
+ index b19c10c7e40c77061337416fd623c53d0863d276..1f54ac21c36902bccb35c64cefa8bb14dd675bb0 100644
470
470
--- a/deps/uv/test/test-list.h
471
471
+++ b/deps/uv/test/test-list.h
472
- @@ -273 ,6 +273 ,7 @@ TEST_DECLARE (process_priority)
472
+ @@ -265 ,6 +265 ,7 @@ TEST_DECLARE (process_priority)
473
473
TEST_DECLARE (has_ref)
474
474
TEST_DECLARE (active)
475
475
TEST_DECLARE (embed)
476
476
+ TEST_DECLARE (embed_with_external_timer)
477
477
TEST_DECLARE (async)
478
478
TEST_DECLARE (async_null_cb)
479
479
TEST_DECLARE (eintr_handling)
480
- @@ -894 ,6 +895 ,7 @@ TASK_LIST_START
480
+ @@ -867 ,6 +868 ,7 @@ TASK_LIST_START
481
481
TEST_ENTRY (active)
482
482
483
483
TEST_ENTRY (embed)
0 commit comments