GeezerVison is showing github.com — deps: upgrade to libuv 1.23.2 · nodejs/node@76cb52c
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: deps/uv/AUTHORS +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 351 | 351 | | 352 | 352 | | 353 | 353 | | | 354 | + |
Collapse file Copy file name to clipboardExpand all lines: deps/uv/CMakeLists.txt -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -193,7 +193,6 @@ if(WIN32) | 193 | 193 | src/win/poll.c | 194 | 194 | src/win/process.c | 195 | 195 | src/win/process-stdio.c | 196 | | - src/win/req.c | 197 | 196 | src/win/signal.c | 198 | 197 | src/win/snprintf.c | 199 | 198 | src/win/stream.c | |
Collapse file Copy file name to clipboardExpand all lines: deps/uv/ChangeLog +38Lines changed: 38 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 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 | + | 1 | 39 | 2018.09.22, Version 1.23.1 (Stable), d2282b3d67821dc53c907c2155fa8c5c6ce25180 | 2 | 40 |
| 3 | 41 | Changes since version 1.23.0: | |
Collapse file Copy file name to clipboardExpand all lines: deps/uv/Makefile.am +2-6Lines changed: 2 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -68,7 +68,6 @@ libuv_la_SOURCES += src/win/async.c \ | 68 | 68 | src/win/poll.c \ | 69 | 69 | src/win/process-stdio.c \ | 70 | 70 | src/win/process.c \ | 71 | | - src/win/req.c \ | 72 | 71 | src/win/req-inl.h \ | 73 | 72 | src/win/signal.c \ | 74 | 73 | src/win/stream.c \ | @@ -340,8 +339,7 @@ libuv_la_SOURCES += src/unix/aix.c src/unix/aix-common.c | 340 | 339 | endif | 341 | 340 |
| 342 | 341 | if ANDROID | 343 | | -uvinclude_HEADERS += include/uv/android-ifaddrs.h \ | 344 | | - include/uv/pthread-barrier.h | | 342 | +uvinclude_HEADERS += include/uv/android-ifaddrs.h | 345 | 343 | libuv_la_SOURCES += src/unix/android-ifaddrs.c \ | 346 | 344 | src/unix/pthread-fixes.c | 347 | 345 | endif | @@ -361,8 +359,7 @@ libuv_la_SOURCES += src/unix/cygwin.c \ | 361 | 359 | endif | 362 | 360 |
| 363 | 361 | if DARWIN | 364 | | -uvinclude_HEADERS += include/uv/darwin.h \ | 365 | | - include/uv/pthread-barrier.h | | 362 | +uvinclude_HEADERS += include/uv/darwin.h | 366 | 363 | libuv_la_CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1 | 367 | 364 | libuv_la_CFLAGS += -D_DARWIN_UNLIMITED_SELECT=1 | 368 | 365 | libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \ | @@ -445,7 +442,6 @@ libuv_la_SOURCES += src/unix/no-proctitle.c \ | 445 | 442 | endif | 446 | 443 |
| 447 | 444 | if OS390 | 448 | | -uvinclude_HEADERS += include/uv/pthread-barrier.h | 449 | 445 | libuv_la_CFLAGS += -D_UNIX03_THREADS \ | 450 | 446 | -D_UNIX03_SOURCE \ | 451 | 447 | -D_OPEN_SYS_IF_EXT=1 \ | |
Collapse file Copy file name to clipboardExpand all lines: deps/uv/configure.ac +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | 14 |
| 15 | 15 | 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]) | 17 | 17 | AC_CONFIG_MACRO_DIR([m4]) | 18 | 18 | m4_include([m4/libuv-extra-automake-flags.m4]) | 19 | 19 | m4_include([m4/as_case.m4]) | |
Collapse file 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 number | Diff line number | Diff line change |
|---|
@@ -126,7 +126,7 @@ so the current approach is to run blocking file I/O operations in a thread pool. | 126 | 126 | For a thorough explanation of the cross-platform file I/O landscape, checkout | 127 | 127 | `this post <http://blog.libtorrent.org/2012/10/asynchronous-disk-io/>`_. | 128 | 128 |
| 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 | 130 | 130 | operations are currently run on this pool: | 131 | 131 |
| 132 | 132 | * File system operations | |
Collapse file Copy file name to clipboardExpand all lines: deps/uv/include/uv/pthread-barrier.h -69Lines changed: 0 additions & 69 deletions Collapse file Copy file name to clipboardExpand all lines: deps/uv/include/uv/unix.h +21-5Lines changed: 21 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 66 | 66 | # include "uv/posix.h" | 67 | 67 | #endif | 68 | 68 |
| 69 | | -#ifndef PTHREAD_BARRIER_SERIAL_THREAD | 70 | | -# include "uv/pthread-barrier.h" | 71 | | -#endif | 72 | | - | 73 | 69 | #ifndef NI_MAXHOST | 74 | 70 | # define NI_MAXHOST 1025 | 75 | 71 | #endif | @@ -136,8 +132,28 @@ typedef pthread_rwlock_t uv_rwlock_t; | 136 | 132 | typedef UV_PLATFORM_SEM_T uv_sem_t; | 137 | 133 | typedef pthread_cond_t uv_cond_t; | 138 | 134 | typedef pthread_key_t uv_key_t; | 139 | | -typedef pthread_barrier_t uv_barrier_t; | 140 | 135 |
| | 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 | 141 | 157 |
| 142 | 158 | /* Platform-specific definitions for uv_spawn support. */ | 143 | 159 | typedef gid_t uv_gid_t; | |
Collapse file Copy file name to clipboardExpand all lines: deps/uv/include/uv/version.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 32 | 32 |
| 33 | 33 | #define UV_VERSION_MAJOR 1 | 34 | 34 | #define UV_VERSION_MINOR 23 | 35 | | -#define UV_VERSION_PATCH 1 | | 35 | +#define UV_VERSION_PATCH 2 | 36 | 36 | #define UV_VERSION_IS_RELEASE 1 | 37 | 37 | #define UV_VERSION_SUFFIX "" | 38 | 38 |
| |
Collapse file Copy file name to clipboardExpand all lines: deps/uv/src/threadpool.c +12-6Lines changed: 12 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -62,10 +62,10 @@ static void worker(void* arg) { | 62 | 62 | uv_sem_post((uv_sem_t*) arg); | 63 | 63 | arg = NULL; | 64 | 64 |
| | 65 | + uv_mutex_lock(&mutex); | 65 | 66 | for (;;) { | 66 | | - uv_mutex_lock(&mutex); | | 67 | + /* `mutex` should always be locked at this point. */ | 67 | 68 |
| 68 | | - wait_for_work: | 69 | 69 | /* Keep waiting while either no work is present or only slow I/O | 70 | 70 | and we're at the threshold for that. */ | 71 | 71 | while (QUEUE_EMPTY(&wq) || | @@ -93,13 +93,13 @@ static void worker(void* arg) { | 93 | 93 | other work in the queue is done. */ | 94 | 94 | if (slow_io_work_running >= slow_work_thread_threshold()) { | 95 | 95 | QUEUE_INSERT_TAIL(&wq, q); | 96 | | - goto wait_for_work; | | 96 | + continue; | 97 | 97 | } | 98 | 98 |
| 99 | 99 | /* If we encountered a request to run slow I/O work but there is none | 100 | 100 | to run, that means it's cancelled => Start over. */ | 101 | 101 | if (QUEUE_EMPTY(&slow_io_pending_wq)) | 102 | | - goto wait_for_work; | | 102 | + continue; | 103 | 103 |
| 104 | 104 | is_slow_work = 1; | 105 | 105 | slow_io_work_running++; | @@ -122,13 +122,19 @@ static void worker(void* arg) { | 122 | 122 | w->work(w); | 123 | 123 |
| 124 | 124 | uv_mutex_lock(&w->loop->wq_mutex); | 125 | | - if (is_slow_work) | 126 | | - slow_io_work_running--; | 127 | 125 | w->work = NULL; /* Signal uv_cancel() that the work req is done | 128 | 126 | executing. */ | 129 | 127 | QUEUE_INSERT_TAIL(&w->loop->wq, &w->wq); | 130 | 128 | uv_async_send(&w->loop->wq_async); | 131 | 129 | 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 | + } | 132 | 138 | } | 133 | 139 | } | 134 | 140 |
| |
|