aboutsummaryrefslogtreecommitdiff
path: root/docs/src
Commit message (Collapse)AuthorAge
...
* win: drop code checking for Windows XP / Server 2k3Saúl Ibarra Corretgé2022-11-08
| | | | Our minimum requirements are Windows 8 now.
* thread: add support for affinity (#3774)daomingq2022-10-21
| | | | | | | | Backported thread affinity feature and related dependency commits from master. It will add support for those APIs: uv_cpumask_size, uv_thread_setaffinity, uv_thread_getaffinity. The supported platforms are Linux, Freebsd, and Windows. Empty implementations (returning UV_ENOTSUP) on non-supported platforms (such as OS X and AIX).
* doc: add uv_poll_cb status==UV_EBADF note (#3797)jensbjorgensen2022-10-21
|
* unix,win: give thread pool threads an 8 MB stack (#3787)Ben Noordhuis2022-10-18
| | | | | | Give the threads in the thread pool a stack size that is consistent across platforms and architectures. Fixes: https://github.com/libuv/libuv/issues/3786
* doc: add note about offset -1 in uv_fs_read/write (#3677)Steven Schveighoffer2022-09-07
|
* unix: fix uv_getrusage() ru_maxrss reporting (#3721)Ben Noordhuis2022-08-21
| | | | | | Most platforms report it in kilobytes but macOS and Solaris report it in bytes and pages respectively. Fixes: https://github.com/nodejs/node/issues/44332
* docs: update introduction.rst (#3664)Ikko Ashimine2022-07-07
| | | Github -> GitHub
* doc: fix link to uvwget example main() function (#3605)blogdaren2022-04-27
|
* unix,win: add uv_available_parallelism() (#3499)Ben Noordhuis2022-03-04
| | | | | | | Replacement for the usage pattern where people use uv_cpu_info() as an imperfect heuristic for determining the amount of parallelism that is available to their programs. Fixes #3493.
* doc: checkout -> check out (#3489)wyckster2022-02-22
| | | | "check out" is a verb phrase, but "checkout" is a noun. Since it is being used as a verb, the spelling "check out" is required.
* document the values of enum uv_stdio_flags (#3039)Paul Evans2022-02-14
| | | Co-authored-by: Jameson Nash <vtjnash@gmail.com>
* win: return fractional seconds in uv_uptime() (#3455)Luca Adrian L2022-02-08
| | | | | | Some systems return fractional seconds, some return full seconds. On Windows uptime was artificially rounded down. Fixes #3447.
* doc/guide: update content and sample code (#3408)woclass2022-01-31
| | | | | | | | | | | | | | | | | | | | - Add `Makefile` for example codes. (cherry-pick from old uvbook repo) - Add a new example "Default loop" to "Basics of libuv"/"Default loop" - Document review and update: `Introduction`, `Basics of libuv`, `Filesystem` + Update the referenced libuv code snippet + Link update: http->https **Content Updates**: - `filesystem.rst`#L291-L297: Add note for `uv_fs_event_start` - `filesystem.rst`#L334: Add description of the callback function parameter `status` The following examples have been tested manually in WSL2 (Ubuntu 20.04) with libuv 1.42.0: - helloworld - default-loop - idle-basic - uvcat - uvtee - onchange (test on macOS) Co-authored-by: Nikhil Marathe <nsm.nikhil@gmail.com>
* unix,win: add uv_ip_name to get name from sockaddr (#3368)Campbell He2021-11-25
| | | | | uv_ip_name is a kind of wrapper of uv_ip4_name and uv_ip6_name which can be used after getaddrinfo to get the IP name directly from addrinfo.ai_addr.
* doc: replace pyuv with uvloop (#3324)Ofek Lev2021-10-10
| | | | | | - pyuv is not actively maintained - uvloop is downloaded 11M/mo, pyuv only 25k/mo Refs: https://github.com/saghul/pyuv/issues/270#issuecomment-925106097
* doc: fix broken links for netbsd's sysctl manpage (#3312)YAKSH BARIYA2021-10-05
|
* docs: fix wrong information about schedulingMohamed Edrah2021-07-29
| | | | | | Fixes: https://github.com/libuv/libuv/issues/3252 PR-URL: https://github.com/libuv/libuv/pull/3253 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* doc,udp: note that suggested_size is 1 max-sized dgramRyan Liptak2021-07-13
| | | | | | | | | | | | The intention here is to make working with recvmmsg more straight-forward, since internally libuv expects buffers that are multiples of UV__UDP_DGRAM_MAXSIZE, but previously the availability of that value wasn't readily apparent to the caller. Closes: https://github.com/libuv/libuv/issues/2822 Closes: https://github.com/libuv/libuv/issues/1025 Closes: https://github.com/libuv/libuv/pull/1114 PR-URL: https://github.com/libuv/libuv/pull/2986 Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* doc: switch discussion forum to githubJameson Nash2021-06-30
| | | | | | | | | Freenode is gone (replaced by Libera.chat), but IRC was unused anyways. Fixes: https://github.com/libuv/libuv/issues/3157 Fixes: https://github.com/libuv/libuv/issues/3208 PR-URL: https://github.com/libuv/libuv/pull/3214 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* docs: move list of project links under PR controlJameson Nash2021-06-22
| | | | | | | | Copied from https://github.com/libuv/libuv/wiki/Projects-that-use-libuv, since the wiki was vulnerable to spam content. PR-URL: https://github.com/libuv/libuv/pull/3204 Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* doc: more accurate list of valid send_handle'stwosee2021-06-18
| | | | PR-URL: https://github.com/libuv/libuv/pull/3201 Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* stream: introduce uv_try_write2 functiontwosee2021-05-28
| | | | | | | | | | `uv_try_write2(stream, bufs, nbufs, send_handle)` acts like `uv_try_write()` and extended write function for sending handles over a pipe like `uv_write2`. It always returns `UV_EAGAIN` instead of `UV_ENOSYS` on Windows so we can easily write cross-platform code without special treatment. PR-URL: https://github.com/libuv/libuv/pull/3183 Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* doc: uv_read_stop always succeedsSimon Kissane2021-05-24
| | | | | | Fixes: https://github.com/libuv/libuv/issues/3041 PR-URL: https://github.com/libuv/libuv/pull/3076 Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* errors: map ESOCKTNOSUPPORT errnoRyan Liptak2021-05-21
| | | | | PR-URL: https://github.com/libuv/libuv/pull/3151 Reviewed-By: Jameson Nash <vtjnash@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* include: add EOVERFLOW status code mappingDarshan Sen2021-05-13
| | | | | | | Refs: https://github.com/nodejs/node/pull/38159#discussion_r610288214 PR-URL: https://github.com/libuv/libuv/pull/3145 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* zos: implement uv_get_constrained_memory()Shuowang (Wayne) Zhang2021-04-04
| | | | | | | | Implementation is based on RLIMIT_MEMLIMIT. Co-authored-by: Igor Todorovski <itodorov@ca.ibm.com> PR-URL: https://github.com/libuv/libuv/pull/3133 Reviewed-By: Richard Lau <rlau@redhat.com>
* linux,udp: enable full ICMP error reportingOndřej Surý2021-02-17
| | | | | | | | | | | The Linux kernel suppresses some ICMP error messages by default for UDP sockets. This commit sets IP_RECVERR/IPV6_RECVERR on the socket to enable full ICMP error reporting, hopefully resulting in faster failover to working name servers. PR-URL: https://github.com/libuv/libuv/pull/2872 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* doc: fix code highlightingraisinten2021-02-14
| | | | | | | | | | | | | | | Affected docs: * basics.rst * filesystem.rst * eventloops.rst * networking.rst * processes.rst * threads.rst * utilities.rst Fixes: https://github.com/libuv/libuv/issues/3033 PR-URL: https://github.com/libuv/libuv/pull/3082 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* doc: fix versionadded metadataColin Ihrig2021-01-04
| | | | | | | | This commit adds the versionadded metadata for uv_pipe() and uv_socketpair(). Refs: https://github.com/libuv/libuv/pull/2953 PR-URL: https://github.com/libuv/libuv/pull/3087 Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* doc: clarify UDP errors and recvmmsgEthel Weston2020-12-28
| | | | | | | PR-URL: https://github.com/libuv/libuv/pull/3061 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* stream: add uv_pipe and uv_socketpair to the APIJameson Nash2020-11-09
| | | | | | Equivalents of `pipe` and `socketpair` for cross-platform use. PR-URL: https://github.com/libuv/libuv/pull/2953 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* unix,win: harmonize uv_read_start() error handlingBen Noordhuis2020-11-05
| | | | | | | | | | | | The behavior of `uv_read_start()` when the handle is closing or already busy reading wasn't consistent across platforms. Now it is. Fixes: https://github.com/libuv/help/issues/137 PR-URL: https://github.com/libuv/libuv/pull/2795 Reviewed-By: Jameson Nash <vtjnash@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
* doc,poll: add notes (repeated cb & cancel pending cb)Elad Nachmias2020-11-04
| | | | | | | | | | | | Added notes to documentation of `uv_poll_t`: - The callback will be called over-and-over again as long as the socket remains readable/writable. - uv_poll_stop() cancels pending callbacks of already happened events. Fixes: https://github.com/libuv/libuv/issues/1078 PR-URL: https://github.com/libuv/libuv/pull/1100 Co-authored-by: Jameson Nash <vtjnash@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* doc: uv_tcp_bind() never returns UV_EADDRINUSEBen Noordhuis2020-10-27
| | | | | | | | | It defers the error to uv_listen() or uv_tcp_connect(). PR-URL: https://github.com/libuv/libuv/pull/2218 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* unix,win: add uv_timer_get_due_in()Ulrik Strid2020-09-21
| | | | | | | | | | Co-authored-by: Jeremiah Senkpiel <fishrock123@rocketmail.com> Refs: https://github.com/nodejs/node-report/pull/73 Refs: https://github.com/libuv/libuv/pull/1255 Fixes: https://github.com/libuv/libuv/issues/2950 PR-URL: https://github.com/libuv/libuv/pull/2951 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* doc: add uv_metrics_idle_time() version metadataRyan Liptak2020-09-03
| | | | | | | Refs: https://github.com/libuv/libuv/pull/2725 PR-URL: https://github.com/libuv/libuv/pull/2984 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* doc: correct UV_UDP_MMSG_FREE version addedcjihrig2020-09-03
| | | | | | | Refs: https://github.com/libuv/libuv/pull/2836 PR-URL: https://github.com/libuv/libuv/pull/2985 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* udp: add UV_UDP_MMSG_FREE recv_cb flagRyan Liptak2020-09-02
| | | | | | | | Refs: https://github.com/libuv/libuv/issues/2822 PR-URL: https://github.com/libuv/libuv/pull/2836 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jameson Nash <vtjnash@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* nfci: address some style nitsJameson Nash2020-08-21
| | | | PR-URL: https://github.com/libuv/libuv/pull/2954 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* doc: fix most sphinx warningsJameson Nash2020-08-18
| | | | PR-URL: https://github.com/libuv/libuv/pull/2956 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* aix: protect uv_exepath() from uv_set_process_title()Richard Lau2020-08-10
| | | | | | | | | | | | Store a copy of the original argv[0] to protect `uv_exepath()` against `uv_set_process_title()` changing the value of argv[0]. Extract common code for finding a program on the current PATH. Fixes: https://github.com/libuv/libuv/issues/2674 PR-URL: https://github.com/libuv/libuv/pull/2677 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* unix: error when uv_setup_args() is not calledRyan Liptak2020-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit updates uv_{get,set}_process_title() to return an error when uv_setup_args() is needed, but has not been called. Per-platform behavior after this commit: - Windows: uv_setup_args() does nothing, get/set process title works as before. - Unix: get/set process title will return ENOBUFS if uv_setup_args() wasn't called, if it failed, or if the process title memory has been freed by uv__process_title_cleanup() (via uv_library_shutdown()). - AIX: set process title returns ENOBUFS if uv_setup_args() wasn't called, if it failed to allocate memory for the argv copy, or if the proctitle memory has been freed by uv__process_title_cleanup() (via uv_library_shutdown). Getting the process title will do the same except it can still succeed if uv_setup_args() was called but failed to allocate memory for the argv copy. - BSD: uv_setup_args() is only needed for getting the initial process title; if uv_setup_args() is not called then any get_process_title calls() before a set_process_title() call will return an empty string. - Platforms that use no-proctitle.c: get will return an empty string, set is a no-op (these are the same as before this commit) Fixes: https://github.com/libuv/libuv/issues/2845 PR-URL: https://github.com/libuv/libuv/pull/2853 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* core: add API to measure event loop idle timeTrevor Norris2020-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API addition `uv_metrics_idle_time()` is a thread safe call that allows the user to retrieve the amount of time the event loop has spent in the kernel's event provider (i.e. poll). It was done this way to allow retrieving this value without needing to interrupt the execution of the event loop. This option can be enabled by passing `UV_METRICS_IDLE_TIME` to `uv_loop_configure()`. One important aspect of this change is, when enabled, to always first call the event provider with a `timeout == 0`. This allows libuv to know whether any events were waiting in the event queue when the event provider was called. The importance of this is because libuv is tracking the amount of "idle time", not "poll time". Thus the provider entry time is not recorded when `timeout == 0` (the event provider never idles in this case). While this does add a small amount of overhead, when enabled, but the overhead decreases when the event loop has a heavier load. This is because poll events will be waiting when the event provider is called. Thus never actually recording the provider entry time. Checking if `uv_loop_t` is configured with `UV_METRICS_IDLE_TIME` always happens in `uv__metrics_set_provider_entry_time()` and `uv__metrics_update_idle_time()`. Making the conditional logic wrapping each call simpler and allows for instrumentation to always hook into those two function calls. Rather than placing the fields directly on `uv__loop_internal_fields_t` add the struct `uv__loop_metrics_t` as a location for future metrics API additions. Tests and additional documentation has been included. PR-URL: https://github.com/libuv/libuv/pull/2725 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* doc: add more error constantsJinHyuk Kim2020-07-31
| | | | PR-URL: https://github.com/libuv/libuv/pull/2932 Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* udp: add uv_udp_using_recvmmsg queryRyan Liptak2020-07-28
| | | | | | | | | Allows for determining if a buffer large enough for multiple dgrams should be allocated in alloc_cb of uv_udp_recvstart, for example. Contributes towards #2822. PR-URL: https://github.com/libuv/libuv/pull/2830 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* docs: improve the descriptions for get memory infoJuan Sebastian velez Posada2020-07-28
| | | | PR-URL: https://github.com/libuv/libuv/pull/2780 Reviewed-By: Jameson Nash <vtjnash@gmail.com>
* doc: fix formattingBen Noordhuis2020-05-07
| | | | | | | Fixes: https://github.com/libuv/libuv/issues/2831 PR-URL: https://github.com/libuv/libuv/pull/2833 Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* fs: report original errorBartosz Sosnowski2020-04-29
| | | | | | | | | | | | | Exposes the original system error of the filesystem syscalls. Adds a new uv_fs_get_system_error which returns orignal errno on Linux or GetLastError on Windows. Ref: https://github.com/libuv/libuv/issues/2348 PR-URL: https://github.com/libuv/libuv/pull/2810 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* doc: add uv_replace_allocator thread safety warningtwosee2020-04-28
| | | | | | PR-URL: https://github.com/libuv/libuv/pull/2815/ Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* doc: check/idle/prepare functions always succeedBen Noordhuis2020-04-28
| | | | | | | | | Make the documentation reflect that the init/start/stop functions for check/idle/prepare handles always succeed. PR-URL: https://github.com/libuv/libuv/pull/2803 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>