Skip to content

Commit

Permalink
Merge tag 'v1.46.0' into merge_1.46.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Nov 14, 2023
2 parents 71ffdec + f0bb7e4 commit 633629e
Show file tree
Hide file tree
Showing 65 changed files with 1,531 additions and 795 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sphinx:
fail_on_warning: false

build:
os: "ubuntu-22.04"
tools:
python: "3.9"

Expand Down
6 changes: 6 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -542,3 +542,9 @@ Lewis Russell <[email protected]>
sivadeilra <[email protected]>
cui fliter <[email protected]>
Mohammed Keyvanzadeh <[email protected]>
Niklas Mischkulnig <[email protected]>
Stefan Karpinski <[email protected]>
liuxiang88 <[email protected]>
Jeffrey H. Johnson <[email protected]>
Abdirahim Musse <[email protected]>
小明 <[email protected]>
61 changes: 60 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,63 @@
2023.05.19, Version 1.45.0 (Stable)
2023.06.30, Version 1.46.0 (Stable)

Changes since version 1.45.0:

* Add SHA to ChangeLog (Santiago Gimeno)

* misc: update readthedocs config (Jameson Nash)

* test: remove erroneous RETURN_SKIP (Ben Noordhuis)

* android: disable io_uring support (Ben Noordhuis)

* linux: add some more iouring backed fs ops (Santiago Gimeno)

* build: add autoconf option for disable-maintainer-mode (Jameson Nash)

* fs: use WTF-8 on Windows (Stefan Karpinski)

* unix,win: replace QUEUE with struct uv__queue (Ben Noordhuis)

* linux: fs_read to use io_uring if iovcnt > IOV_MAX (Santiago Gimeno)

* ios: fix uv_getrusage() ru_maxrss calculation (Ben Noordhuis)

* include: update outdated code comment (Ben Noordhuis)

* linux: support abstract unix sockets (Ben Noordhuis)

* unix,win: add UV_PIPE_NO_TRUNCATE flag (Ben Noordhuis)

* unix: add loongarch support (liuxiang88)

* doc: add DPS8M to LINKS.md (Jeffrey H. Johnson)

* include: add EUNATCH errno mapping (Abdirahim Musse)

* src: don't run timers if loop is stopped/unref'd (Trevor Norris)

* win: fix -Wpointer-to-int-cast warning (Ben Noordhuis)

* test,win: fix -Wunused-variable warning (Ben Noordhuis)

* test,win: fix -Wformat warning (Ben Noordhuis)

* linux: work around io_uring IORING_OP_CLOSE bug (Ben Noordhuis)

* win: remove unused functions (Ben Noordhuis)

* bench: add bench to check uv_loop_alive (Trevor Norris)

* test: add uv_cancel test for threadpool (Trevor Norris)

* unix: skip prohibited syscalls on tvOS and watchOS (小明)

* unix,fs: make no_pwritev access thread-safe (Santiago Gimeno)

* unix: fix build for lower versions of Android (小明)


2023.05.19, Version 1.45.0 (Stable), 96e05543f53b19d9642b4b0dd73b86ad3cea313e

Changes since version 1.44.2:

Expand Down
3 changes: 2 additions & 1 deletion LINKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* [clearskies_core](https://github.com/larroy/clearskies_core): Clearskies file synchronization program. (C++11)
* [CMake](https://cmake.org) open-source, cross-platform family of tools designed to build, test and package software
* [Cocos-Engine](https://github.com/cocos/cocos-engine): The runtime framework for Cocos Creator editor.
* [Coherence](https://github.com/liesware/coherence/): Cryptographic server for modern web apps.
* [Coherence](https://github.com/liesware/coherence/): Cryptographic server for modern web apps.
* [DPS8M](https://dps8m.gitlab.io): GE ∕ Honeywell ∕ Bull DPS‑8/M and 6180/L68 mainframe simulator.
* [DPS-For-IoT](https://github.com/intel/dps-for-iot/wiki): Fully distributed publish/subscribe protocol.
* [HashLink](https://github.com/HaxeFoundation/hashlink): Haxe run-time with libuv support included.
* [Haywire](https://github.com/kellabyte/Haywire): Asynchronous HTTP server.
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ m4_include([m4/libuv-extra-automake-flags.m4])
m4_include([m4/as_case.m4])
m4_include([m4/libuv-check-flags.m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects] UV_EXTRA_AUTOMAKE_FLAGS)
AM_MAINTAINER_MODE([enable]) # pass --disable-maintainer-mode if autotools may be unavailable
AC_CANONICAL_HOST
AC_ENABLE_SHARED
AC_ENABLE_STATIC
Expand Down
3 changes: 3 additions & 0 deletions docs/src/errors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ Error constants
socket type not supported

.. c:macro:: UV_EUNATCH
protocol driver not attached

API
---
Expand Down
42 changes: 41 additions & 1 deletion docs/src/pipe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,62 @@ API
Bind the pipe to a file path (Unix) or a name (Windows).
Does not support Linux abstract namespace sockets,
unlike :c:func:`uv_pipe_bind2`.
Alias for ``uv_pipe_bind2(handle, name, strlen(name), 0)``.
.. note::
If a path on Unix exceeds ``sizeof(sockaddr_un.sun_path)`` bytes, typically between
92 and 108 bytes, ``uv_pipe_bind`` will fail with ``UV_ENAMETOOLONG``.
.. versionchanged:: 2.0.0 long filenames will lead to an error rather than being truncated
.. c:function:: int uv_pipe_bind2(uv_pipe_t* handle, const char* name, size_t namelen, unsigned int flags)
Bind the pipe to a file path (Unix) or a name (Windows).
``flags`` must be zero or ``UV_PIPE_NO_TRUNCATE``. Returns ``UV_EINVAL``
for unsupported flags without performing the bind operation.
Supports Linux abstract namespace sockets. ``namelen`` must include
the leading nul byte but not the trailing nul byte.
.. versionadded:: 1.46.0
.. note::
``UV_PIPE_NO_TRUNCATE`` flag is ignored in v2.0 (already the default behavior).
.. c:function:: void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle, const char* name, uv_connect_cb cb)
Connect to the Unix domain socket or the named pipe.
Connect to the Unix domain socket or the Windows named pipe.
Does not support Linux abstract namespace sockets,
unlike :c:func:`uv_pipe_connect2`.
Alias for ``uv_pipe_connect2(req, handle, name, strlen(name), 0, cb)``.
.. note::
If a path on Unix exceeds ``sizeof(sockaddr_un.sun_path)`` bytes, typically between
92 and 108 bytes, ``uv_pipe_bind`` will fail with ``UV_ENAMETOOLONG``.
.. versionchanged:: 2.0.0 long filenames will lead to an error rather than being truncated
.. c:function:: void uv_pipe_connect2(uv_connect_t* req, uv_pipe_t* handle, const char* name, size_t namelen, unsigned int flags, uv_connect_cb cb)
Connect to the Unix domain socket or the Windows named pipe.
``flags`` must be zero or ``UV_PIPE_NO_TRUNCATE``. Returns ``UV_EINVAL``
for unsupported flags without performing the connect operation.
Supports Linux abstract namespace sockets. ``namelen`` must include
the leading nul byte but not the trailing nul byte.
.. versionadded:: 1.46.0
.. note::
``UV_PIPE_NO_TRUNCATE`` flag is ignored in v2.0 (already the default behavior).
.. c:function:: int uv_pipe_getsockname(const uv_pipe_t* handle, char* buffer, size_t* size)
Get the name of the Unix domain socket or the named pipe.
Expand Down
29 changes: 25 additions & 4 deletions include/uv.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ extern "C" {
#include <stddef.h>
#include <stdint.h>

/* Internal type, do not use. */
struct uv__queue {
struct uv__queue* next;
struct uv__queue* prev;
};

#if defined(_WIN32)
# include "uv/win.h"
# if !defined(BUILDING_UV_SHARED)
Expand Down Expand Up @@ -152,6 +158,7 @@ extern "C" {
XX(EILSEQ, "illegal byte sequence") \
XX(ESOCKTNOSUPPORT, "socket type not supported") \
XX(ENODATA, "no data available") \
XX(EUNATCH, "protocol driver not attached") \

#define UV_HANDLE_TYPE_MAP(XX) \
XX(ASYNC, async) \
Expand Down Expand Up @@ -285,13 +292,13 @@ UV_EXTERN int uv_loop_init(uv_loop_t* loop);
UV_EXTERN int uv_loop_close(uv_loop_t* loop);
/*
* NOTE:
* This function is DEPRECATED (to be removed after 0.12), users should
* This function is DEPRECATED, users should
* allocate the loop manually and use uv_loop_init instead.
*/
UV_EXTERN uv_loop_t* uv_loop_new(void);
/*
* NOTE:
* This function is DEPRECATED (to be removed after 0.12). Users should use
* This function is DEPRECATED. Users should use
* uv_loop_close and free the memory manually instead.
*/
UV_EXTERN void uv_loop_delete(uv_loop_t*);
Expand Down Expand Up @@ -450,7 +457,7 @@ struct uv_shutdown_s {
uv_handle_type type; \
/* private */ \
uv_close_cb close_cb; \
void* handle_queue[2]; \
struct uv__queue handle_queue; \
UV_HANDLE_PRIVATE_FIELDS \

/* The abstract base class of all handles. */
Expand Down Expand Up @@ -848,6 +855,10 @@ inline int uv_tty_set_mode(uv_tty_t* handle, int mode) {

UV_EXTERN uv_handle_type uv_guess_handle(uv_os_fd_t file);

enum {
UV_PIPE_NO_TRUNCATE = 1u << 0
};

/*
* uv_pipe_t is a subclass of uv_stream_t.
*
Expand All @@ -864,10 +875,20 @@ struct uv_pipe_s {
UV_EXTERN int uv_pipe_init(uv_loop_t*, uv_pipe_t* handle, int ipc);
UV_EXTERN int uv_pipe_open(uv_pipe_t*, uv_os_fd_t file);
UV_EXTERN int uv_pipe_bind(uv_pipe_t* handle, const char* name);
UV_EXTERN int uv_pipe_bind2(uv_pipe_t* handle,
const char* name,
size_t namelen,
unsigned int flags);
UV_EXTERN void uv_pipe_connect(uv_connect_t* req,
uv_pipe_t* handle,
const char* name,
uv_connect_cb cb);
UV_EXTERN int uv_pipe_connect2(uv_connect_t* req,
uv_pipe_t* handle,
const char* name,
size_t namelen,
unsigned int flags,
uv_connect_cb cb);
UV_EXTERN int uv_pipe_getsockname(const uv_pipe_t* handle,
char* buffer,
size_t* size);
Expand Down Expand Up @@ -1924,7 +1945,7 @@ struct uv_loop_s {
void* data;
/* Loop reference counting. */
unsigned int active_handles;
void* handle_queue[2];
struct uv__queue handle_queue;
union {
void* unused;
unsigned int count;
Expand Down
6 changes: 3 additions & 3 deletions include/uv/darwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
void* cf_state; \
uv_mutex_t cf_mutex; \
uv_sem_t cf_sem; \
void* cf_signals[2]; \
struct uv__queue cf_signals; \

#define UV_PLATFORM_FS_EVENT_FIELDS \
uv__io_t event_watcher; \
char* realpath; \
int realpath_len; \
int cf_flags; \
uv_async_t* cf_cb; \
void* cf_events[2]; \
void* cf_member[2]; \
struct uv__queue cf_events; \
struct uv__queue cf_member; \
int cf_error; \
uv_mutex_t cf_mutex; \

Expand Down
6 changes: 6 additions & 0 deletions include/uv/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,4 +468,10 @@
# define UV__ENODATA (-4024)
#endif

#if defined(EUNATCH) && !defined(_WIN32)
# define UV__EUNATCH UV__ERR(EUNATCH)
#else
# define UV__EUNATCH (-4023)
#endif

#endif /* UV_ERRNO_H_ */
2 changes: 1 addition & 1 deletion include/uv/linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
int inotify_fd; \

#define UV_PLATFORM_FS_EVENT_FIELDS \
void* watchers[2]; \
struct uv__queue watchers; \
int wd; \

#endif /* UV_LINUX_H */
2 changes: 1 addition & 1 deletion include/uv/threadpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct uv__work {
void (*work)(struct uv__work *w);
void (*done)(struct uv__work *w, int status);
struct uv_loop_s* loop;
void* wq[2];
struct uv__queue wq;
};

#endif /* UV_THREADPOOL_H_ */
Loading

0 comments on commit 633629e

Please sign in to comment.