aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-05-21 11:29:47 +0200
committerChristian Clason <c.clason@uni-graz.at>2023-05-21 11:29:47 +0200
commit3b66f92d0e5a21a438eeb1b817eb434e21155608 (patch)
treed1a57579e22636b9c2872785a8e0f4e88d93bdfe
parentbbedbc347fe2fae0e4e49925a23dc5395067d7a3 (diff)
downloadrneovim-3b66f92d0e5a21a438eeb1b817eb434e21155608.tar.gz
rneovim-3b66f92d0e5a21a438eeb1b817eb434e21155608.tar.bz2
rneovim-3b66f92d0e5a21a438eeb1b817eb434e21155608.zip
docs(luv): update to HEAD
-rw-r--r--runtime/doc/luvref.txt112
1 files changed, 112 insertions, 0 deletions
diff --git a/runtime/doc/luvref.txt b/runtime/doc/luvref.txt
index 2be75d5b0c..79dd1248aa 100644
--- a/runtime/doc/luvref.txt
+++ b/runtime/doc/luvref.txt
@@ -3499,6 +3499,65 @@ uv.thread_equal({thread}, {other_thread}) *uv.thread_equal()*
This function is equivalent to the `__eq` metamethod.
Returns: `boolean`
+ *uv.thread_setaffinity()*
+uv.thread_setaffinity({thread}, {affinity} [, {get_old_affinity}])
+
+ > method form `thread:setaffinity(affinity, [get_old_affinity])`
+
+ Parameters:
+ - `thread`: `luv_thread_t userdata`
+ - `affinity`: `table`
+ - `[1, 2, 3, ..., n]` : `boolean`
+ - `get_old_affinity`: `boolean`
+
+ Sets the specified thread's affinity setting. `affinity` must
+ be an array-like table where each of the keys correspond to a
+ CPU number and the values are booleans that represent whether
+ the `thread` should be eligible to run on that CPU. The length
+ of the `affinity` table must be greater than or equal to
+ `uv.cpumask_size()`. If `get_old_affinity` is `true`, the
+ previous affinity settings for the `thread` will be returned.
+ Otherwise, `true` is returned after a successful call.
+
+ Note: Thread affinity setting is not atomic on Windows.
+ Unsupported on macOS.
+
+ Returns: `table` or `boolean` or `fail`
+ - `[1, 2, 3, ..., n]` : `boolean`
+
+
+uv.thread_getaffinity({thread} [, {mask_size}]) *uv.thread_getaffinity()*
+
+ > method form `thread:getaffinity([mask_size])`
+
+ Parameters:
+ - `thread`: `luv_thread_t userdata`
+ - `mask_size`: `integer`
+
+ Gets the specified thread's affinity setting.
+
+ If `mask_size` is provided, it must be greater than or equal
+ to `uv.cpumask_size()`. If the `mask_size` parameter is
+ omitted, then the return of `uv.cpumask_size()` will be used.
+ Returns an array-like table where each of the keys correspond
+ to a CPU number and the values are booleans that represent
+ whether the `thread` is eligible to run on that CPU.
+
+ Note: Thread affinity getting is not atomic on Windows.
+ Unsupported on macOS.
+
+ Returns: `table` or `fail`
+ - `[1, 2, 3, ..., n]` : `boolean`
+
+uv.thread_getcpu() *uv.thread_getcpu()*
+
+ Gets the CPU number on which the calling thread is running.
+
+ Note: The first CPU will be returned as the number 1, not 0.
+ This allows for the number to correspond with the table keys
+ used in `uv.thread_getaffinity` and `uv.thread_setaffinity`.
+
+ Returns: `integer` or `fail`
uv.thread_self() *uv.thread_self()*
@@ -3588,6 +3647,16 @@ uv.get_constrained_memory() *uv.get_constrained_memory()*
Returns: `number`
+uv.get_available_memory() *uv.get_available_memory()*
+
+ Gets the amount of free memory that is still available to the
+ process (in bytes). This differs from `uv.get_free_memory()`
+ in that it takes into account any limits imposed by the OS. If
+ there is no such constraint, or the constraint is unknown, the
+ amount returned will be identical to `uv.get_free_memory()`.
+
+ Returns: `number`
+
uv.resident_set_memory() *uv.resident_set_memory()*
Returns the resident set size (RSS) for the current process.
@@ -3652,6 +3721,14 @@ uv.cpu_info() *uv.cpu_info()*
- `idle` : `number`
- `irq` : `number`
+uv.cpumask_size() *uv.cpumask_size()*
+
+ Returns the maximum size of the mask used for process/thread
+ affinities, or `ENOTSUP` if affinities are not supported on
+ the current platform.
+
+ Returns: `integer` or `fail`
+
uv.getpid() *uv.getpid()*
DEPRECATED: Please use |uv.os_getpid()| instead.
@@ -3708,6 +3785,25 @@ uv.hrtime() *uv.hrtime()*
Returns: `number`
+uv.clock_gettime({clock_id}) *uv.clock_gettime()*
+
+ Parameters:
+ - `clock_id`: `string`
+
+ Obtain the current system time from a high-resolution
+ real-time or monotonic clock source. `clock_id` can be the
+ string `"monotonic"` or `"realtime"`.
+
+ The real-time clock counts from the UNIX epoch (1970-01-01)
+ and is subject to time adjustments; it can jump back in time.
+
+ The monotonic clock counts from an arbitrary point in the past
+ and never jumps back in time.
+
+ Returns: `table` or `fail`
+ - `sec`: `integer`
+ - `nsec`: `integer`
+
uv.uptime() *uv.uptime()*
Returns the current system uptime in seconds.
@@ -3979,6 +4075,22 @@ uv.metrics_idle_time() *uv.metrics_idle_time()*
Returns: `number`
+uv.metrics_info() *uv.metrics_info()*
+
+ Get the metrics table from current set of event loop metrics.
+
+ Returns: `table`
+
+ The table contains event loop metrics. It is recommended to
+ retrieve these metrics in a uv_prepare_cb in order to make
+ sure there are no inconsistencies with the metrics counters.
+
+ - `loop_count` : `integer`
+ - `events` : `integer`
+ - `events_waiting` : `integer`
+
+ Note: New in libuv version 1.45.0.
+
==============================================================================
CREDITS *luv-credits*