diff options
author | Saúl Ibarra Corretgé <saghul@gmail.com> | 2015-01-28 22:14:19 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2015-01-28 22:47:38 +0100 |
commit | 097fde7129a3acc660beb372cecd9daf1164a7f2 (patch) | |
tree | 2bb1b2fb58b314f739df4ac91b0d60bee9c21277 /deps/uv/docs | |
parent | 6ad236c9b6a344a88ec2f1f173d5f920984b77b7 (diff) | |
download | android-node-v8-097fde7129a3acc660beb372cecd9daf1164a7f2.tar.gz android-node-v8-097fde7129a3acc660beb372cecd9daf1164a7f2.tar.bz2 android-node-v8-097fde7129a3acc660beb372cecd9daf1164a7f2.zip |
deps: update libuv to 1.3.0
PR-URL: https://github.com/iojs/io.js/pull/644
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/uv/docs')
-rw-r--r-- | deps/uv/docs/src/dns.rst | 13 | ||||
-rw-r--r-- | deps/uv/docs/src/fs_event.rst | 10 | ||||
-rw-r--r-- | deps/uv/docs/src/fs_poll.rst | 7 | ||||
-rw-r--r-- | deps/uv/docs/src/loop.rst | 6 | ||||
-rw-r--r-- | deps/uv/docs/src/pipe.rst | 19 | ||||
-rw-r--r-- | deps/uv/docs/src/poll.rst | 4 | ||||
-rw-r--r-- | deps/uv/docs/src/threadpool.rst | 6 |
7 files changed, 58 insertions, 7 deletions
diff --git a/deps/uv/docs/src/dns.rst b/deps/uv/docs/src/dns.rst index d7c889f7ad..3b15377f91 100644 --- a/deps/uv/docs/src/dns.rst +++ b/deps/uv/docs/src/dns.rst @@ -39,6 +39,13 @@ Public members Loop that started this getaddrinfo request and where completion will be reported. Readonly. +.. c:member:: struct addrinfo* uv_getaddrinfo_t.addrinfo + + Pointer to a `struct addrinfo` containing the result. Must be freed by the user + with :c:func:`uv_freeaddrinfo`. + + .. versionchanged:: 1.3.0 the field is declared as public. + .. c:member:: uv_loop_t* uv_getnameinfo_t.loop Loop that started this getnameinfo request and where completion will be @@ -68,6 +75,9 @@ API Call :c:func:`uv_freeaddrinfo` to free the addrinfo structure. + .. versionchanged:: 1.3.0 the callback parameter is now allowed to be NULL, + in which case the request will run **synchronously**. + .. c:function:: void uv_freeaddrinfo(struct addrinfo* ai) Free the struct addrinfo. Passing NULL is allowed and is a no-op. @@ -80,4 +90,7 @@ API callback will get called sometime in the future with the lookup result. Consult `man -s 3 getnameinfo` for more details. + .. versionchanged:: 1.3.0 the callback parameter is now allowed to be NULL, + in which case the request will run **synchronously**. + .. seealso:: The :c:type:`uv_req_t` API functions also apply. diff --git a/deps/uv/docs/src/fs_event.rst b/deps/uv/docs/src/fs_event.rst index 9bc9939fc2..681ae52f95 100644 --- a/deps/uv/docs/src/fs_event.rst +++ b/deps/uv/docs/src/fs_event.rst @@ -87,16 +87,22 @@ API Start the handle with the given callback, which will watch the specified `path` for changes. `flags` can be an ORed mask of :c:type:`uv_fs_event_flags`. + .. note:: Currently the only supported flag is ``UV_FS_EVENT_RECURSIVE`` and + only on OSX. + .. c:function:: int uv_fs_event_stop(uv_fs_event_t* handle) Stop the handle, the callback will no longer be called. -.. c:function:: int uv_fs_event_getpath(uv_fs_event_t* handle, char* buf, size_t* len) +.. c:function:: int uv_fs_event_getpath(uv_fs_event_t* handle, char* buffer, size_t* size) Get the path being monitored by the handle. The buffer must be preallocated by the user. Returns 0 on success or an error code < 0 in case of failure. - On success, `buf` will contain the path and `len` its length. If the buffer + On success, `buffer` will contain the path and `size` its length. If the buffer is not big enough UV_ENOBUFS will be returned and len will be set to the required size. + .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte, + and the buffer is not null terminated. + .. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/deps/uv/docs/src/fs_poll.rst b/deps/uv/docs/src/fs_poll.rst index df31053521..4efb2440e0 100644 --- a/deps/uv/docs/src/fs_poll.rst +++ b/deps/uv/docs/src/fs_poll.rst @@ -58,12 +58,15 @@ API Stop the handle, the callback will no longer be called. -.. c:function:: int uv_fs_poll_getpath(uv_fs_poll_t* handle, char* buf, size_t* len) +.. c:function:: int uv_fs_poll_getpath(uv_fs_poll_t* handle, char* buffer, size_t* size) Get the path being monitored by the handle. The buffer must be preallocated by the user. Returns 0 on success or an error code < 0 in case of failure. - On success, `buf` will contain the path and `len` its length. If the buffer + On success, `buffer` will contain the path and `size` its length. If the buffer is not big enough UV_ENOBUFS will be returned and len will be set to the required size. + .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte, + and the buffer is not null terminated. + .. seealso:: The :c:type:`uv_handle_t` API functions also apply. diff --git a/deps/uv/docs/src/loop.rst b/deps/uv/docs/src/loop.rst index d347534bfc..203672bd34 100644 --- a/deps/uv/docs/src/loop.rst +++ b/deps/uv/docs/src/loop.rst @@ -80,6 +80,12 @@ API Returns the initialized default loop. It may return NULL in case of allocation failure. + This function is just a convenient way for having a global loop throughout + an application, the default loop is in no way different than the ones + initialized with :c:func:`uv_loop_init`. As such, the default loop can (and + should) be closed with :c:func:`uv_loop_close` so the resources associated + with it are freed. + .. c:function:: int uv_run(uv_loop_t* loop, uv_run_mode mode) This function runs the event loop. It will act differently depending on the diff --git a/deps/uv/docs/src/pipe.rst b/deps/uv/docs/src/pipe.rst index 9fbb1f6c20..8f8402c29b 100644 --- a/deps/uv/docs/src/pipe.rst +++ b/deps/uv/docs/src/pipe.rst @@ -56,15 +56,30 @@ API Paths on Unix get truncated to ``sizeof(sockaddr_un.sun_path)`` bytes, typically between 92 and 108 bytes. -.. c:function:: int uv_pipe_getsockname(const uv_pipe_t* handle, char* buf, size_t* len) +.. 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. - A preallocated buffer must be provided. The len parameter holds the length + A preallocated buffer must be provided. The size parameter holds the length of the buffer and it's set to the number of bytes written to the buffer on output. If the buffer is not big enough ``UV_ENOBUFS`` will be returned and len will contain the required size. + .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte, + and the buffer is not null terminated. + +.. c:function:: int uv_pipe_getpeername(const uv_pipe_t* handle, char* buffer, size_t* size) + + Get the name of the Unix domain socket or the named pipe to which the handle + is connected. + + A preallocated buffer must be provided. The size parameter holds the length + of the buffer and it's set to the number of bytes written to the buffer on + output. If the buffer is not big enough ``UV_ENOBUFS`` will be returned and + len will contain the required size. + + .. versionadded:: 1.3.0 + .. c:function:: void uv_pipe_pending_instances(uv_pipe_t* handle, int count) Set the number of pending pipe instance handles when the pipe server is diff --git a/deps/uv/docs/src/poll.rst b/deps/uv/docs/src/poll.rst index f34842256b..907cb1a613 100644 --- a/deps/uv/docs/src/poll.rst +++ b/deps/uv/docs/src/poll.rst @@ -70,11 +70,15 @@ API Initialize the handle using a file descriptor. + .. versionchanged:: 1.2.2 the file descriptor is set to non-blocking mode. + .. c:function:: int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle, uv_os_sock_t socket) Initialize the handle using a socket descriptor. On Unix this is identical to :c:func:`uv_poll_init`. On windows it takes a SOCKET handle. + .. versionchanged:: 1.2.2 the socket is set to non-blocking mode. + .. c:function:: int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb) Starts polling the file descriptor. `events` is a bitmask consisting made up diff --git a/deps/uv/docs/src/threadpool.rst b/deps/uv/docs/src/threadpool.rst index 66ff53e230..89f00844ef 100644 --- a/deps/uv/docs/src/threadpool.rst +++ b/deps/uv/docs/src/threadpool.rst @@ -12,7 +12,11 @@ Its default size is 4, but it can be changed at startup time by setting the ``UV_THREADPOOL_SIZE`` environment variable to any value (the absolute maximum is 128). -The threadpool is global and shared across all event loops. +The threadpool is global and shared across all event loops. When a particular +function makes use of the threadpool (i.e. when using :c:func:`uv_queue_work`) +libuv preallocates and initializes the maximum number of threads allowed by +``UV_THREADPOOL_SIZE``. This causes a relatively minor memory overhead +(~1MB for 128 threads) but increases the performance of threading at runtime. Data types |