Skip to content

Commit 3374f57

Browse files
saghulrvagg
authored andcommitted
deps: update libuv to 0.10.37
Fixes: nodejs/node#7199 Refs: nodejs/node#2723 PR-URL: nodejs/node#7293 Reviewed-By: Rod Vagg <[email protected]>
1 parent fcb9145 commit 3374f57

29 files changed

+274
-298
lines changed

deps/uv/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,4 @@ Helge Deller <[email protected]>
135135
Logan Rosen <[email protected]>
136136
Kenneth Perry <[email protected]>
137137
Michael Penick <[email protected]>
138+
Stephen von Takach <[email protected]>

deps/uv/ChangeLog

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
1-
2015.02.27, Version 0.10.36 (Stable)
1+
2016.06.14, Version 0.10.37 (Stable)
2+
3+
Changes since version 0.10.36:
4+
5+
* build: update the location of gyp (Stephen von Takach)
6+
7+
* linux: fix epoll_pwait() fallback on arm64 (Ben Noordhuis)
8+
9+
* test: fix fs_chown when running as root (Ben Noordhuis)
10+
11+
* tests: skip some tests when network is unreachable (Luca Bruno)
12+
13+
* unix: do not discard environmental LDFLAGS (Luca Bruno)
14+
15+
* src: replace ngx_queue_split with ngx_queue_move (Ben Noordhuis)
16+
17+
* unix: use ngx_queue_move when iterating over lists (Ben Noordhuis)
18+
19+
* win: fix unsavory rwlock fallback implementation (Bert Belder)
20+
21+
* unix: map ENFILE errno (Saúl Ibarra Corretgé)
22+
23+
* doc: add note indicating branch status (Saúl Ibarra Corretgé)
24+
25+
26+
2015.02.27, Version 0.10.36 (Stable), cc4d42a89a2a0ae0ff8e14321de086eba3c3b4ca
227

328
Changes since version 0.10.35:
429

deps/uv/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ eventually contain all platform differences in this library.
66

77
http://nodejs.org/
88

9+
**This branch only receives security fixes and will be EOL'd by the end of 2016,
10+
please switch to version v1.x**
11+
912
## Features
1013

1114
* Non-blocking TCP sockets
@@ -81,13 +84,7 @@ To have GYP generate build script for another system, make sure that
8184
you have Python 2.6 or 2.7 installed, then checkout GYP into the
8285
project tree manually:
8386

84-
mkdir -p build
85-
svn co http://gyp.googlecode.com/svn/trunk build/gyp
86-
87-
Or:
88-
89-
mkdir -p build
90-
git clone https://git.chromium.org/external/gyp.git build/gyp
87+
git clone https://chromium.googlesource.com/external/gyp.git build/gyp
9188

9289
Unix users run
9390

deps/uv/config-unix.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ E=
2222
CSTDFLAG=--std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter
2323
CFLAGS += -g
2424
CPPFLAGS += -I$(SRCDIR)/src
25-
LDFLAGS=-lm -pthread
25+
LDFLAGS += -lm -pthread
2626

2727
CPPFLAGS += -D_LARGEFILE_SOURCE
2828
CPPFLAGS += -D_FILE_OFFSET_BITS=64

deps/uv/include/uv-private/ngx-queue.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,17 @@ struct ngx_queue_s {
106106
while (0)
107107

108108

109+
#define ngx_queue_move(h, n) \
110+
do { \
111+
if (ngx_queue_empty(h)) \
112+
ngx_queue_init(n); \
113+
else { \
114+
ngx_queue_t* q = ngx_queue_head(h); \
115+
ngx_queue_split(h, q, n); \
116+
} \
117+
} \
118+
while (0)
119+
109120
#define ngx_queue_add(h, n) \
110121
do { \
111122
(h)->prev->next = (n)->next; \
@@ -120,6 +131,9 @@ struct ngx_queue_s {
120131
((type *) ((unsigned char *) q - offsetof(type, link)))
121132

122133

134+
/* Important note: mutating the list while ngx_queue_foreach is
135+
* iterating over its elements results in undefined behavior.
136+
*/
123137
#define ngx_queue_foreach(q, h) \
124138
for ((q) = ngx_queue_head(h); \
125139
(q) != ngx_queue_sentinel(h) && !ngx_queue_empty(h); \

deps/uv/include/uv-private/uv-win.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,20 @@ typedef union {
235235
} uv_cond_t;
236236

237237
typedef union {
238-
/* srwlock_ has type SRWLOCK, but not all toolchains define this type in */
239-
/* windows.h. */
240-
SRWLOCK srwlock_;
241238
struct {
242-
uv_mutex_t read_mutex_;
243-
uv_mutex_t write_mutex_;
244239
unsigned int num_readers_;
245-
} fallback_;
240+
CRITICAL_SECTION num_readers_lock_;
241+
HANDLE write_semaphore_;
242+
} state_;
243+
/* TODO: remove me in v2.x. */
244+
struct {
245+
SRWLOCK unused_;
246+
} unused1_;
247+
/* TODO: remove me in v2.x. */
248+
struct {
249+
uv_mutex_t unused1_;
250+
uv_mutex_t unused2_;
251+
} unused2_;
246252
} uv_rwlock_t;
247253

248254
typedef struct {

deps/uv/src/unix/async.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,18 @@ void uv__async_close(uv_async_t* handle) {
7474
static void uv__async_event(uv_loop_t* loop,
7575
struct uv__async* w,
7676
unsigned int nevents) {
77+
ngx_queue_t queue;
7778
ngx_queue_t* q;
7879
uv_async_t* h;
7980

80-
ngx_queue_foreach(q, &loop->async_handles) {
81+
ngx_queue_move(&loop->async_handles, &queue);
82+
while (!ngx_queue_empty(&queue)) {
83+
q = ngx_queue_head(&queue);
8184
h = ngx_queue_data(q, uv_async_t, queue);
8285

86+
ngx_queue_remove(q);
87+
ngx_queue_insert_tail(&loop->async_handles, q);
88+
8389
if (cmpxchgi(&h->pending, 1, 0) == 0)
8490
continue;
8591

deps/uv/src/unix/darwin.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,12 @@ static void uv__cf_loop_cb(void* arg) {
133133
loop = arg;
134134

135135
uv_mutex_lock(&loop->cf_mutex);
136-
ngx_queue_init(&split_head);
137-
if (!ngx_queue_empty(&loop->cf_signals)) {
138-
ngx_queue_t* split_pos = ngx_queue_next(&loop->cf_signals);
139-
ngx_queue_split(&loop->cf_signals, split_pos, &split_head);
140-
}
136+
ngx_queue_move(&loop->cf_signals, &split_head);
141137
uv_mutex_unlock(&loop->cf_mutex);
142138

143139
while (!ngx_queue_empty(&split_head)) {
144140
item = ngx_queue_head(&split_head);
141+
ngx_queue_remove(item);
145142

146143
s = ngx_queue_data(item, uv__cf_loop_signal_t, member);
147144

@@ -151,7 +148,6 @@ static void uv__cf_loop_cb(void* arg) {
151148
else
152149
s->cb(s->arg);
153150

154-
ngx_queue_remove(item);
155151
free(s);
156152
}
157153
}

deps/uv/src/unix/error.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
110110
case ERANGE: return UV_ERANGE;
111111
case ENXIO: return UV_ENXIO;
112112
case EMLINK: return UV_EMLINK;
113+
case ENFILE: return UV_ENFILE;
113114
default: return UV_UNKNOWN;
114115
}
115116
UNREACHABLE();

deps/uv/src/unix/fsevents.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ struct uv__fsevents_event_s {
5555
ngx_queue_t split_head; \
5656
uv__fsevents_event_t* event; \
5757
uv_mutex_lock(&(handle)->cf_mutex); \
58-
ngx_queue_init(&split_head); \
59-
if (!ngx_queue_empty(&(handle)->cf_events)) { \
60-
ngx_queue_t* split_pos = ngx_queue_next(&(handle)->cf_events); \
61-
ngx_queue_split(&(handle)->cf_events, split_pos, &split_head); \
62-
} \
58+
ngx_queue_move(&(handle)->cf_events, &split_head); \
6359
uv_mutex_unlock(&(handle)->cf_mutex); \
6460
while (!ngx_queue_empty(&split_head)) { \
6561
curr = ngx_queue_head(&split_head); \

0 commit comments

Comments
 (0)