Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 62dd1d7

Browse filesBrowse files
cjihrigMylesBorins
authored andcommitted
deps: upgrade to libuv 1.23.2
Backport-PR-URL: #24103 PR-URL: #23336 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Fixes: #23043 Fixes: #21773 Fixes: #16601 Fixes: #22999 Fixes: #23219 Fixes: #23066 Fixes: #23067 Fixes: #23089
1 parent dbc7d9b commit 62dd1d7
Copy full SHA for 62dd1d7
Expand file treeCollapse file tree

29 files changed

+558
-284
lines changed
Open diff view settings
Collapse file

‎deps/uv/AUTHORS‎

Copy file name to clipboardExpand all lines: deps/uv/AUTHORS
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,4 @@ Jeremiah Senkpiel <fishrock123@rocketmail.com>
351351
Andy Zhang <zhangyong232@gmail.com>
352352
dmabupt <dmabupt@gmail.com>
353353
Ryan Liptak <squeek502@hotmail.com>
354+
Ali Ijaz Sheikh <ofrobots@google.com>
Collapse file

‎deps/uv/CMakeLists.txt‎

Copy file name to clipboardExpand all lines: deps/uv/CMakeLists.txt
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ if(WIN32)
193193
src/win/poll.c
194194
src/win/process.c
195195
src/win/process-stdio.c
196-
src/win/req.c
197196
src/win/signal.c
198197
src/win/snprintf.c
199198
src/win/stream.c
Collapse file

‎deps/uv/ChangeLog‎

Copy file name to clipboardExpand all lines: deps/uv/ChangeLog
+38Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
2018.10.09, Version 1.23.2 (Stable), 34c12788d2e7308f3ac506c0abcbf74c0d6abd20
2+
3+
Changes since version 1.23.1:
4+
5+
* unix: return 0 retrieving rss on cygwin (cjihrig)
6+
7+
* unix: initialize uv_interface_address_t.phys_addr (cjihrig)
8+
9+
* test: handle uv_os_setpriority() windows edge case (cjihrig)
10+
11+
* tty, win: fix read stop for raw mode (Bartosz Sosnowski)
12+
13+
* Revert "Revert "unix,fs: fix for potential partial reads/writes"" (Jameson
14+
Nash)
15+
16+
* unix,readv: always permit partial reads to return (Jameson Nash)
17+
18+
* win,tty: fix uv_tty_close() (Bartosz Sosnowski)
19+
20+
* doc: remove extraneous "on" (Ben Noordhuis)
21+
22+
* unix,win: fix threadpool race condition (Anna Henningsen)
23+
24+
* unix: rework thread barrier implementation (Ben Noordhuis)
25+
26+
* aix: switch to libuv's own thread barrier impl (Ben Noordhuis)
27+
28+
* unix: signal done to last thread barrier waiter (Ben Noordhuis)
29+
30+
* test: add uv_barrier_wait serial thread test (Ali Ijaz Sheikh)
31+
32+
* unix: optimize uv_fs_readlink() memory allocation (Ben Noordhuis)
33+
34+
* win: remove req.c and other cleanup (Carlo Marcelo Arenas Belón)
35+
36+
* aix: don't EISDIR on read from directory fd (Ben Noordhuis)
37+
38+
139
2018.09.22, Version 1.23.1 (Stable), d2282b3d67821dc53c907c2155fa8c5c6ce25180
240

341
Changes since version 1.23.0:
Collapse file

‎deps/uv/Makefile.am‎

Copy file name to clipboardExpand all lines: deps/uv/Makefile.am
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ libuv_la_SOURCES += src/win/async.c \
6868
src/win/poll.c \
6969
src/win/process-stdio.c \
7070
src/win/process.c \
71-
src/win/req.c \
7271
src/win/req-inl.h \
7372
src/win/signal.c \
7473
src/win/stream.c \
@@ -340,8 +339,7 @@ libuv_la_SOURCES += src/unix/aix.c src/unix/aix-common.c
340339
endif
341340

342341
if ANDROID
343-
uvinclude_HEADERS += include/uv/android-ifaddrs.h \
344-
include/uv/pthread-barrier.h
342+
uvinclude_HEADERS += include/uv/android-ifaddrs.h
345343
libuv_la_SOURCES += src/unix/android-ifaddrs.c \
346344
src/unix/pthread-fixes.c
347345
endif
@@ -361,8 +359,7 @@ libuv_la_SOURCES += src/unix/cygwin.c \
361359
endif
362360

363361
if DARWIN
364-
uvinclude_HEADERS += include/uv/darwin.h \
365-
include/uv/pthread-barrier.h
362+
uvinclude_HEADERS += include/uv/darwin.h
366363
libuv_la_CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
367364
libuv_la_CFLAGS += -D_DARWIN_UNLIMITED_SELECT=1
368365
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
@@ -445,7 +442,6 @@ libuv_la_SOURCES += src/unix/no-proctitle.c \
445442
endif
446443

447444
if OS390
448-
uvinclude_HEADERS += include/uv/pthread-barrier.h
449445
libuv_la_CFLAGS += -D_UNIX03_THREADS \
450446
-D_UNIX03_SOURCE \
451447
-D_OPEN_SYS_IF_EXT=1 \
Collapse file

‎deps/uv/configure.ac‎

Copy file name to clipboardExpand all lines: deps/uv/configure.ac
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1414

1515
AC_PREREQ(2.57)
16-
AC_INIT([libuv], [1.23.1], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.23.2], [https://github.com/libuv/libuv/issues])
1717
AC_CONFIG_MACRO_DIR([m4])
1818
m4_include([m4/libuv-extra-automake-flags.m4])
1919
m4_include([m4/as_case.m4])
Collapse file

‎deps/uv/docs/src/design.rst‎

Copy file name to clipboardExpand all lines: deps/uv/docs/src/design.rst
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ so the current approach is to run blocking file I/O operations in a thread pool.
126126
For a thorough explanation of the cross-platform file I/O landscape, checkout
127127
`this post <http://blog.libtorrent.org/2012/10/asynchronous-disk-io/>`_.
128128

129-
libuv currently uses a global thread pool on which all loops can queue work on. 3 types of
129+
libuv currently uses a global thread pool on which all loops can queue work. 3 types of
130130
operations are currently run on this pool:
131131

132132
* File system operations
Collapse file

‎deps/uv/include/uv/pthread-barrier.h‎

Copy file name to clipboardExpand all lines: deps/uv/include/uv/pthread-barrier.h
-69Lines changed: 0 additions & 69 deletions
This file was deleted.
Collapse file

‎deps/uv/include/uv/unix.h‎

Copy file name to clipboardExpand all lines: deps/uv/include/uv/unix.h
+21-5Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@
6666
# include "uv/posix.h"
6767
#endif
6868

69-
#ifndef PTHREAD_BARRIER_SERIAL_THREAD
70-
# include "uv/pthread-barrier.h"
71-
#endif
72-
7369
#ifndef NI_MAXHOST
7470
# define NI_MAXHOST 1025
7571
#endif
@@ -136,8 +132,28 @@ typedef pthread_rwlock_t uv_rwlock_t;
136132
typedef UV_PLATFORM_SEM_T uv_sem_t;
137133
typedef pthread_cond_t uv_cond_t;
138134
typedef pthread_key_t uv_key_t;
139-
typedef pthread_barrier_t uv_barrier_t;
140135

136+
/* Note: guard clauses should match uv_barrier_init's in src/unix/thread.c. */
137+
#if defined(_AIX) || !defined(PTHREAD_BARRIER_SERIAL_THREAD)
138+
/* TODO(bnoordhuis) Merge into uv_barrier_t in v2. */
139+
struct _uv_barrier {
140+
uv_mutex_t mutex;
141+
uv_cond_t cond;
142+
unsigned threshold;
143+
unsigned in;
144+
unsigned out;
145+
};
146+
147+
typedef struct {
148+
struct _uv_barrier* b;
149+
# if defined(PTHREAD_BARRIER_SERIAL_THREAD)
150+
/* TODO(bnoordhuis) Remove padding in v2. */
151+
char pad[sizeof(pthread_barrier_t) - sizeof(struct _uv_barrier*)];
152+
# endif
153+
} uv_barrier_t;
154+
#else
155+
typedef pthread_barrier_t uv_barrier_t;
156+
#endif
141157

142158
/* Platform-specific definitions for uv_spawn support. */
143159
typedef gid_t uv_gid_t;
Collapse file

‎deps/uv/include/uv/version.h‎

Copy file name to clipboardExpand all lines: deps/uv/include/uv/version.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#define UV_VERSION_MAJOR 1
3434
#define UV_VERSION_MINOR 23
35-
#define UV_VERSION_PATCH 1
35+
#define UV_VERSION_PATCH 2
3636
#define UV_VERSION_IS_RELEASE 1
3737
#define UV_VERSION_SUFFIX ""
3838

Collapse file

‎deps/uv/src/threadpool.c‎

Copy file name to clipboardExpand all lines: deps/uv/src/threadpool.c
+12-6Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ static void worker(void* arg) {
6262
uv_sem_post((uv_sem_t*) arg);
6363
arg = NULL;
6464

65+
uv_mutex_lock(&mutex);
6566
for (;;) {
66-
uv_mutex_lock(&mutex);
67+
/* `mutex` should always be locked at this point. */
6768

68-
wait_for_work:
6969
/* Keep waiting while either no work is present or only slow I/O
7070
and we're at the threshold for that. */
7171
while (QUEUE_EMPTY(&wq) ||
@@ -93,13 +93,13 @@ static void worker(void* arg) {
9393
other work in the queue is done. */
9494
if (slow_io_work_running >= slow_work_thread_threshold()) {
9595
QUEUE_INSERT_TAIL(&wq, q);
96-
goto wait_for_work;
96+
continue;
9797
}
9898

9999
/* If we encountered a request to run slow I/O work but there is none
100100
to run, that means it's cancelled => Start over. */
101101
if (QUEUE_EMPTY(&slow_io_pending_wq))
102-
goto wait_for_work;
102+
continue;
103103

104104
is_slow_work = 1;
105105
slow_io_work_running++;
@@ -122,13 +122,19 @@ static void worker(void* arg) {
122122
w->work(w);
123123

124124
uv_mutex_lock(&w->loop->wq_mutex);
125-
if (is_slow_work)
126-
slow_io_work_running--;
127125
w->work = NULL; /* Signal uv_cancel() that the work req is done
128126
executing. */
129127
QUEUE_INSERT_TAIL(&w->loop->wq, &w->wq);
130128
uv_async_send(&w->loop->wq_async);
131129
uv_mutex_unlock(&w->loop->wq_mutex);
130+
131+
/* Lock `mutex` since that is expected at the start of the next
132+
* iteration. */
133+
uv_mutex_lock(&mutex);
134+
if (is_slow_work) {
135+
/* `slow_io_work_running` is protected by `mutex`. */
136+
slow_io_work_running--;
137+
}
132138
}
133139
}
134140

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.