Skip to content

Commit 90e99da

Browse files
cjihrigtargos
authored andcommitted
deps: upgrade to libuv 1.23.0
Notable changes: - Restores compatibility with the old IPC protocol. - Adds uv_open_osfhandle(). - Adds uv_os_{get,set}priority(). PR-URL: #22365 Fixes: #21671 Fixes: #15433 Refs: #21675 Refs: nodejs/node-addon-api#304 Refs: nodejs/abi-stable-node#318 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent fd6033c commit 90e99da

24 files changed

+633
-104
lines changed

deps/uv/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,4 @@ Peter Johnson <johnson.peter@gmail.com>
345345
Paolo Greppi <paolo.greppi@libpf.com>
346346
Shelley Vohr <shelley.vohr@gmail.com>
347347
Ujjwal Sharma <usharma1998@gmail.com>
348+
Michał Kozakiewicz <michalkozakiewicz3@gmail.com>

deps/uv/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ set(uv_test_sources
9898
test/test-poll-closesocket.c
9999
test/test-poll-oob.c
100100
test/test-poll.c
101+
test/test-process-priority.c
101102
test/test-process-title-threadsafe.c
102103
test/test-process-title.c
103104
test/test-queue-foreach-delete.c

deps/uv/ChangeLog

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
2018.08.18, Version 1.23.0 (Stable), 7ebb26225f2eaae6db22f4ef34ce76fa16ff89ec
2+
3+
Changes since version 1.22.0:
4+
5+
* win,pipe: restore compatibility with the old IPC framing protocol (Bert
6+
Belder)
7+
8+
* fs: add uv_open_osfhandle (Bartosz Sosnowski)
9+
10+
* doc: update Visual C++ Build Tools URL (Michał Kozakiewicz)
11+
12+
* unix: loop starvation on successful write complete (jBarz)
13+
14+
* win: add uv__getnameinfo_work() error handling (A. Hauptmann)
15+
16+
* win: return UV_ENOMEM from uv_loop_init() (cjihrig)
17+
18+
* unix,win: add uv_os_{get,set}priority() (cjihrig)
19+
20+
* test: fix warning in test-tcp-open (Santiago Gimeno)
21+
22+
123
2018.07.11, Version 1.22.0 (Stable), 8568f78a777d79d35eb7d6994617267b9fb33967
224

325
Changes since version 1.21.0:

deps/uv/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
224224
test/test-poll-close-doesnt-corrupt-stack.c \
225225
test/test-poll-closesocket.c \
226226
test/test-poll-oob.c \
227+
test/test-process-priority.c \
227228
test/test-process-title.c \
228229
test/test-process-title-threadsafe.c \
229230
test/test-queue-foreach-delete.c \

deps/uv/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ See the [guidelines for contributing][].
349349
[libuv_banner]: https://raw.githubusercontent.com/libuv/libuv/master/img/banner.png
350350
[x32]: https://en.wikipedia.org/wiki/X32_ABI
351351
[Python 2.6 or 2.7]: https://www.python.org/downloads/
352-
[Visual C++ Build Tools]: http://landinghub.visualstudio.com/visual-cpp-build-tools
352+
[Visual C++ Build Tools]: https://visualstudio.microsoft.com/visual-cpp-build-tools/
353353
[Visual Studio 2015 Update 3]: https://www.visualstudio.com/vs/older-downloads/
354354
[Visual Studio 2017]: https://www.visualstudio.com/downloads/
355355
[Git for Windows]: http://git-scm.com/download/win

deps/uv/configure.ac

Lines 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.22.0], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.23.0], [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])

deps/uv/docs/src/fs.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,15 @@ Helper functions
403403
404404
.. versionadded:: 1.12.0
405405
406+
.. c:function:: int uv_open_osfhandle(uv_os_fd_t os_fd)
407+
408+
For a OS-dependent handle, get the file descriptor in the C runtime.
409+
On UNIX, returns the ``os_fd`` intact. On Windows, this calls `_open_osfhandle <https://msdn.microsoft.com/en-us/library/bdts1c9x.aspx>`_.
410+
Note that the return value is still owned by the CRT,
411+
any attempts to close it or to use it after closing the handle may lead to malfunction.
412+
413+
.. versionadded:: 1.23.0
414+
406415
File open constants
407416
-------------------
408417

deps/uv/docs/src/misc.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,3 +517,31 @@ API
517517
storage required to hold the value.
518518
519519
.. versionadded:: 1.12.0
520+
521+
.. c:function:: int uv_os_getpriority(uv_pid_t pid, int* priority)
522+
523+
Retrieves the scheduling priority of the process specified by `pid`. The
524+
returned value of `priority` is between -20 (high priority) and 19 (low
525+
priority).
526+
527+
.. note::
528+
On Windows, the returned priority will equal one of the `UV_PRIORITY`
529+
constants.
530+
531+
.. versionadded:: 1.23.0
532+
533+
.. c:function:: int uv_os_setpriority(uv_pid_t pid, int priority)
534+
535+
Sets the scheduling priority of the process specified by `pid`. The
536+
`priority` value range is between -20 (high priority) and 19 (low priority).
537+
The constants `UV_PRIORITY_LOW`, `UV_PRIORITY_BELOW_NORMAL`,
538+
`UV_PRIORITY_NORMAL`, `UV_PRIORITY_ABOVE_NORMAL`, `UV_PRIORITY_HIGH`, and
539+
`UV_PRIORITY_HIGHEST` are also provided for convenience.
540+
541+
.. note::
542+
On Windows, this function utilizes `SetPriorityClass()`. The `priority`
543+
argument is mapped to a Windows priority class. When retrieving the
544+
process priority, the result will equal one of the `UV_PRIORITY`
545+
constants, and not necessarily the exact value of `priority`.
546+
547+
.. versionadded:: 1.23.0

deps/uv/include/uv.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@ UV_EXTERN int uv_set_process_title(const char* title);
10651065
UV_EXTERN int uv_resident_set_memory(size_t* rss);
10661066
UV_EXTERN int uv_uptime(double* uptime);
10671067
UV_EXTERN uv_os_fd_t uv_get_osfhandle(int fd);
1068+
UV_EXTERN int uv_open_osfhandle(uv_os_fd_t os_fd);
10681069

10691070
typedef struct {
10701071
long tv_sec;
@@ -1099,6 +1100,16 @@ UV_EXTERN void uv_os_free_passwd(uv_passwd_t* pwd);
10991100
UV_EXTERN uv_pid_t uv_os_getpid(void);
11001101
UV_EXTERN uv_pid_t uv_os_getppid(void);
11011102

1103+
#define UV_PRIORITY_LOW 19
1104+
#define UV_PRIORITY_BELOW_NORMAL 10
1105+
#define UV_PRIORITY_NORMAL 0
1106+
#define UV_PRIORITY_ABOVE_NORMAL -7
1107+
#define UV_PRIORITY_HIGH -14
1108+
#define UV_PRIORITY_HIGHEST -20
1109+
1110+
UV_EXTERN int uv_os_getpriority(uv_pid_t pid, int* priority);
1111+
UV_EXTERN int uv_os_setpriority(uv_pid_t pid, int priority);
1112+
11021113
UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count);
11031114
UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count);
11041115

deps/uv/include/uv/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232

3333
#define UV_VERSION_MAJOR 1
34-
#define UV_VERSION_MINOR 22
34+
#define UV_VERSION_MINOR 23
3535
#define UV_VERSION_PATCH 0
3636
#define UV_VERSION_IS_RELEASE 1
3737
#define UV_VERSION_SUFFIX ""

0 commit comments

Comments
 (0)