@@ -40,7 +40,7 @@ index ee1c94ccd389915ea7572cce044256a7788025ad..d31abf714d5d1433ec8473ccb1aae3b6
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
- indexe1805c323795e5b0c465d80100eebeb7bf838caa..dd4358c0cdaa97ba8fadf4d9755993803beddd18 100644
43
+ index0ff2669e30a628dbb2df9e28ba14b38cf14114e5..117190ef26338944b78dbed7380c631de8057223 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 e1805c323795e5b0c465d80100eebeb7bf838caa..dd4358c0cdaa97ba8fadf4d975599380
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);
52
53
53
-
54
- @@ -70,7 +69,7 @@ int uv_async_send(uv_async_t* handle) {
55
- return 0;
54
+ @@ -78,7 +77,7 @@ int uv_async_send(uv_async_t* handle) {
56
55
57
56
/* Wake up the other thread's event loop. */
58
- - uv__async_send(handle->loop);
59
- + uv__loop_interrupt(handle->loop);
57
+ if (atomic_exchange(pending, 1) == 0)
58
+ - uv__async_send(handle->loop);
59
+ + uv__loop_interrupt(handle->loop);
60
60
61
- /*Tell theother 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) {
61
+ /*Set theloop to not-busy . */
62
+ atomic_fetch_add(busy, -1);
63
+ @@ -178,39 +177 ,6 @@ static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
64
64
}
65
65
66
66
@@ -97,15 +97,14 @@ index e1805c323795e5b0c465d80100eebeb7bf838caa..dd4358c0cdaa97ba8fadf4d975599380
97
97
- abort();
98
98
- }
99
99
-
100
- -
100
+
101
101
static int uv__async_start(uv_loop_t* loop) {
102
102
int pipefd[2];
103
- int err;
104
103
diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c
105
- index54c769f37f2331136c87a37c13fb4e3f9a8f22f9..ac52ab79a5fc3050effd2b1f2f605cee9b1ab336 100644
104
+ index25c5181f370e94983e8a5f797f02f7a8dc207e00..f4d9059796d2c65339a5d48ecb273b09d9364d21 100644
106
105
--- a/deps/uv/src/unix/core.c
107
106
+++ b/deps/uv/src/unix/core.c
108
- @@ -900 ,6 +900 ,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
107
+ @@ -926 ,6 +926 ,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
109
108
loop->watchers[w->fd] = w;
110
109
loop->nfds++;
111
110
}
@@ -115,20 +114,20 @@ index 54c769f37f2331136c87a37c13fb4e3f9a8f22f9..ac52ab79a5fc3050effd2b1f2f605cee
115
114
}
116
115
117
116
118
- @@ -931 ,6 +934 ,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
117
+ @@ -957 ,6 +960 ,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
119
118
}
120
- else if (QUEUE_EMPTY (&w->watcher_queue))
121
- QUEUE_INSERT_TAIL (&loop->watcher_queue, &w->watcher_queue);
119
+ else if (uv__queue_empty (&w->watcher_queue))
120
+ uv__queue_insert_tail (&loop->watcher_queue, &w->watcher_queue);
122
121
+
123
122
+ if (uv__get_internal_fields(loop)->flags & UV_LOOP_INTERRUPT_ON_IO_CHANGE)
124
123
+ uv__loop_interrupt(loop);
125
124
}
126
125
127
126
128
- @@ -947 ,6 +953 ,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
127
+ @@ -973 ,6 +979 ,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
129
128
void uv__io_feed(uv_loop_t* loop, uv__io_t* w) {
130
- if (QUEUE_EMPTY (&w->pending_queue))
131
- QUEUE_INSERT_TAIL (&loop->pending_queue, &w->pending_queue);
129
+ if (uv__queue_empty (&w->pending_queue))
130
+ uv__queue_insert_tail (&loop->pending_queue, &w->pending_queue);
132
131
+
133
132
+ if (uv__get_internal_fields(loop)->flags & UV_LOOP_INTERRUPT_ON_IO_CHANGE)
134
133
+ uv__loop_interrupt(loop);
@@ -463,7 +462,7 @@ index 1d3355fdc67310feb63738c9e30724f0e77f7895..77a63dbb4d188b2ad571c814dbc6cbc6
463
462
+ run_loop();
464
463
+ ASSERT_EQ(main_timer_called, 1);
465
464
466
- MAKE_VALGRIND_HAPPY();
465
+ MAKE_VALGRIND_HAPPY(loop );
467
466
return 0;
468
467
diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h
469
468
index b19c10c7e40c77061337416fd623c53d0863d276..1f54ac21c36902bccb35c64cefa8bb14dd675bb0 100644