History log of /libuv/src/unix/aix.c (Results 1 – 25 of 57)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 1b01b786 24-May-2023 Ben Noordhuis

unix,win: replace QUEUE with struct uv__queue (#4022)

Recent versions of gcc have started emitting warnings about the liberal
type casting inside the QUEUE macros. Although the warnings

unix,win: replace QUEUE with struct uv__queue (#4022)

Recent versions of gcc have started emitting warnings about the liberal
type casting inside the QUEUE macros. Although the warnings are false
positives, let's use them as the impetus to switch to a type-safer and
arguably cleaner approach.

Fixes: https://github.com/libuv/libuv/issues/4019

show more ...


# e02642cf 17-Apr-2023 Trevor Norris

src: fix events/events_waiting metrics counter (#3957)

The worker pool calls all callbacks locally within the queue. So the
value of nevents doesn't properly reflect that case. Increase

src: fix events/events_waiting metrics counter (#3957)

The worker pool calls all callbacks locally within the queue. So the
value of nevents doesn't properly reflect that case. Increase the number
of events directly from the worker pool's callback to correct this.

In order to properly determine if the events_waiting counter needs to be
incremented, store the timeout value at the time the event provider was
called.

show more ...


# 988d225c 24-Nov-2022 Tim Besard

unix,win: add uv_get_available_memory() (#3754)


# e1415860 11-Nov-2022 Trevor Norris

src: add new metrics APIs (#3749)

The following metrics are now always recorded and available via the new
uv_metrics_info() API.

* loop_count: Number of event loop iterations.

src: add new metrics APIs (#3749)

The following metrics are now always recorded and available via the new
uv_metrics_info() API.

* loop_count: Number of event loop iterations.
* events: Total number of events processed by the event handler.
* events_waiting: Total number of events waiting in the event queue when
the event provider request was made.

Benchmarking has shown no noticeable impact recording these metrics.

PR-URL: https://github.com/libuv/libuv/pull/3749

show more ...


# acfe668e 18-Oct-2022 Ben Noordhuis

build: add MemorySanitizer (MSAN) support (#3788)

- unpoison results from linux system call wrappers

- unpoison results from stat/fstat/lstat to pacify clang 14
(fixed in late

build: add MemorySanitizer (MSAN) support (#3788)

- unpoison results from linux system call wrappers

- unpoison results from stat/fstat/lstat to pacify clang 14
(fixed in later versions)

- add MSAN build option

- turn on MSAN CI build

show more ...


Revision tags: v1.41.0, v1.40.0, v1.39.0, v1.38.1, v1.38.0, v1.37.0, v1.36.0, v1.35.0
# ea92e9c7 07-Feb-2020 Richard Lau

aix: protect uv_exepath() from uv_set_process_title()

Store a copy of the original argv[0] to protect `uv_exepath()`
against `uv_set_process_title()` changing the value of argv[0].

aix: protect uv_exepath() from uv_set_process_title()

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>

show more ...


# 07e4168b 16-May-2020 Ryan Liptak

unix: error when uv_setup_args() is not called

This commit updates uv_{get,set}_process_title() to return an
error when uv_setup_args() is needed, but has not been called.

Per-p

unix: error when uv_setup_args() is not called

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>

show more ...


# e8effd45 26-Mar-2020 Trevor Norris

core: add API to measure event loop idle time

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

core: add API to measure event loop idle time

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>

show more ...


# 72fe3543 22-Apr-2020 Ben Noordhuis

unix,win: add uv_library_shutdown()

Make it possible to explicitly tell libuv to release any resources
it's still holding onto (memory, threads, file descriptors, etc.)

Before t

unix,win: add uv_library_shutdown()

Make it possible to explicitly tell libuv to release any resources
it's still holding onto (memory, threads, file descriptors, etc.)

Before this commit, cleanup was performed in various destructors.
This commit centralizes the cleanup logic, enabling the addition of
`uv_library_shutdown()`, but maintains the current observable behavior
of cleaning up when libuv is unloaded by means of `dlclose(3)`.

Fixes: https://github.com/libuv/libuv/issues/2763
PR-URL: https://github.com/libuv/libuv/pull/2764
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...


Revision tags: v1.34.2
# c6811175 21-Jan-2020 Xu Meng

ibmi: implement uv_interface_addresses()

On IBMi PASE we need to call Qp2getifaddrs() to get the network
interface configurations. And to call QDCRLIND to get the physical
addresses.

ibmi: implement uv_interface_addresses()

On IBMi PASE we need to call Qp2getifaddrs() to get the network
interface configurations. And to call QDCRLIND to get the physical
addresses.

PR-URL: https://github.com/libuv/libuv/pull/2614
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

show more ...

Revision tags: v1.34.1, v1.34.0, v1.33.1, v1.33.0, v1.32.0, v1.31.0, v1.30.1, v1.30.0, v1.29.1, v1.29.0
# c4e9657d 01-May-2019 Kelvin Jin

unix,win: add uv_get_constrained_memory()

Fixes: https://github.com/libuv/libuv/issues/2286
PR-URL: https://github.com/libuv/libuv/pull/2289
Reviewed-By: Ben Noordhuis <info@bnoordhu

unix,win: add uv_get_constrained_memory()

Fixes: https://github.com/libuv/libuv/issues/2286
PR-URL: https://github.com/libuv/libuv/pull/2289
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.28.0, v1.27.0, v1.26.0
# 1ce6393a 10-Feb-2019 Ben Noordhuis

unix: don't attempt to invalidate invalid fd

Add a missing check in uv__io_close() where it called
uv__platform_invalidate_fd() without checking that the
watcher actually has a valid

unix: don't attempt to invalidate invalid fd

Add a missing check in uv__io_close() where it called
uv__platform_invalidate_fd() without checking that the
watcher actually has a valid file descriptor assigned.

Fixes: https://github.com/libuv/libuv/issues/2181
PR-URL: https://github.com/libuv/libuv/pull/2182
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.25.0, v1.24.1
# 2d2af382 19-Nov-2018 Jameson Nash

fsevents: really watch files with fsevents on macos 10.7+

In the original PR, the ifdef conditional was reversed,
leading to the old code-path still being used.
This also reduces som

fsevents: really watch files with fsevents on macos 10.7+

In the original PR, the ifdef conditional was reversed,
leading to the old code-path still being used.
This also reduces some of the redundancy in the conditional checks,
by factoring out the common test.
And fixes a divergence in functionality kFSEventsRenamed =>
kFSEventStreamEventFlagItemRenamed
And actually includes the part of the original PR to kqueue that enabled
watching files with fsevents!

Fixes: https://github.com/libuv/libuv/pull/387
PR-URL: https://github.com/libuv/libuv/pull/2082
Refs: https://github.com/libuv/libuv/pull/1572
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

# dce03d58 25-Dec-2018 Gireesh Punathil

aix: manually trigger fs event monitoring

In AIX, fs watch feature leverages AHAFS function.
According to AHAFS, monitoring of events does not
begin until the monitoring application

aix: manually trigger fs event monitoring

In AIX, fs watch feature leverages AHAFS function.
According to AHAFS, monitoring of events does not
begin until the monitoring application issues a select()
or a blocking read() call. In edge cases where the watch
request as well as fs event both occurs in single event
loop cycle, we miss the event, as the event monitors are
created but not yet registered in the current cycle,
instead only enqueued into the poll structure, that will
be taken up with the OS on the loop edge only.

Trigger a select call in-line on the monitoring fd, that
tells AHAFS to kick-start the moitoring.

Fixes: https://github.com/libuv/libuv/issues/2118
PR-URL: https://github.com/libuv/libuv/pull/2123
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

# f4feea33 03-Dec-2018 Ben Noordhuis

aix: fix data race in uv_fs_event_start()

Don't use a buffer with static lifetime to store intermediate results,
use a stack-allocated one.

PR-URL: https://github.com/libuv/libu

aix: fix data race in uv_fs_event_start()

Don't use a buffer with static lifetime to store intermediate results,
use a stack-allocated one.

PR-URL: https://github.com/libuv/libuv/pull/2065
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

show more ...

# bc50d106 03-Dec-2018 Ben Noordhuis

aix: get rid of strcat() calls

Insecure and unnecessary. Replace them with a call to snprintf().

PR-URL: https://github.com/libuv/libuv/pull/2065
Reviewed-By: Refael Ackermann <

aix: get rid of strcat() calls

Insecure and unnecessary. Replace them with a call to snprintf().

PR-URL: https://github.com/libuv/libuv/pull/2065
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

show more ...

# 8972e65b 03-Dec-2018 Ben Noordhuis

unix: harden string copying, introduce strscpy()

Replace calls to strcpy() and strncpy() with the newly introduced
uv__strscpy() function that is meticulous about zero-terminating
th

unix: harden string copying, introduce strscpy()

Replace calls to strcpy() and strncpy() with the newly introduced
uv__strscpy() function that is meticulous about zero-terminating
the destination buffer.

PR-URL: https://github.com/libuv/libuv/pull/2065
Refs: https://www.kernel.org/doc/htmldocs/kernel-api/API-strscpy.html
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

show more ...

Revision tags: v1.24.0
# e0bc951f 06-Nov-2018 Gireesh Punathil

aix: fix race in uv_get_process_title()

The length calculation of the title string was
performed outside of the mutex, causing data corruption
in heavily contended scenarios. Move th

aix: fix race in uv_get_process_title()

The length calculation of the title string was
performed outside of the mutex, causing data corruption
in heavily contended scenarios. Move the length
computation to within the mutex block

Fixes: https://github.com/libuv/libuv/issues/2063
PR-URL: https://github.com/libuv/libuv/pull/2069
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.23.2, v1.23.1, v1.23.0, v1.22.0, v1.21.0, v1.20.3, v1.20.2, v1.20.1, v1.20.0, v1.19.2, v1.19.1
# 89cbbc89 19-Jan-2018 Mason X

include,src: introduce UV__ERR() macro

Using -errno, -E**, and -pthread_function() can be
error prone, and breaks compatibility with some operating
systems that already negate errno'

include,src: introduce UV__ERR() macro

Using -errno, -E**, and -pthread_function() can be
error prone, and breaks compatibility with some operating
systems that already negate errno's (e.g. Haiku).

This commit adds a UV__ERR() macro that ensures libuv
errors are negative.

Fixes: https://github.com/libuv/help/issues/39
PR-URL: https://github.com/libuv/libuv/pull/1687
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.19.0, v1.18.0, v1.17.0
# 8a6d1b32 15-Nov-2017 Matt Harrison

unix: make get(set)_process_title MT-safe

Used a shared uv_mutex_t in unix implementations of these functions
to prevent simultaneous execution.

Fixes: https://github.com/libuv/

unix: make get(set)_process_title MT-safe

Used a shared uv_mutex_t in unix implementations of these functions
to prevent simultaneous execution.

Fixes: https://github.com/libuv/libuv/issues/271
PR-URL: https://github.com/libuv/libuv/pull/1640
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

# 9f70d39b 24-Nov-2017 cjihrig

aix: fix -Wmaybe-uninitialized warning

PR-URL: https://github.com/libuv/libuv/pull/1650
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm

aix: fix -Wmaybe-uninitialized warning

PR-URL: https://github.com/libuv/libuv/pull/1650
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

show more ...

Revision tags: v1.16.1, v1.16.0
# bb3d093b 09-Oct-2017 Xu Meng

ibmi: add support for new platform

Support the IBM i platform.

- add a new file src/unix/ibmi.c
- extract the common functions from /src/unix/aix.c into aix-common.c
- updat

ibmi: add support for new platform

Support the IBM i platform.

- add a new file src/unix/ibmi.c
- extract the common functions from /src/unix/aix.c into aix-common.c
- update uv.gyp and include/uv-unix.h to enable the new file ibmi.c

PR-URL: https://github.com/libuv/libuv/pull/1601
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

show more ...

Revision tags: v1.15.0, v1.14.1, v1.14.0
# 810377f4 08-Jul-2017 Gireesh Punathil

aix: add netmask, mac address into net interfaces

uv_interface_addresses API extracts the network interface entries.
In AIX, this was not fully implemented. retrieve the network mask and

aix: add netmask, mac address into net interfaces

uv_interface_addresses API extracts the network interface entries.
In AIX, this was not fully implemented. retrieve the network mask and
the mac addresses.

Fixes: https://github.com/nodejs/node/issues/14119
PR-URL: https://github.com/libuv/libuv/pull/1410
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

Revision tags: v1.13.1, v1.13.0
# 09444560 04-Jul-2017 Gireesh Punathil

aix: fix un-initialized pointer field in fs handle

On AIX, uv_fs_event_start() didn't always initialize
handle->dir_filename. In this scenario, uv_fs_event_stop()
would free the unin

aix: fix un-initialized pointer field in fs handle

On AIX, uv_fs_event_start() didn't always initialize
handle->dir_filename. In this scenario, uv_fs_event_stop()
would free the uninitialized pointer. This commit
initialized handle->dir_filename to NULL in all cases.

Fixes: https://github.com/nodejs/node/issues/13577
PR-URL: https://github.com/libuv/libuv/pull/1400
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

Revision tags: v1.12.0, v1.11.0, v1.10.2, v1.10.1, v1.10.0, v0.10.37, v1.9.1
# fd7ce57f 22-Apr-2016 Jason Madden

unix: make loops and watchers usable after fork()

Added the uv_loop_fork() API that must be called in a child process to
continue using an existing loop. Internally this calls a uv__io_f

unix: make loops and watchers usable after fork()

Added the uv_loop_fork() API that must be called in a child process to
continue using an existing loop. Internally this calls a uv__io_fork
function for each supported platform, similar to the way
uv__platform_loop_init works.

After this call, existing and new IO, async and signal watchers will
contiue working as before on all platforms, as will the
threadpool (although any threads it was using are of course gone).

On Linux and BSDs that use kqueue, existing and new fsevent watchers
will also continue to work as expected. On OS X, though, directory
fsevents will not be able to use the optimized CoreFoundation path if
they had already been used in the parent process, instead falling back
to the kqueue path used on other BSDs.

Existing fsevent watchers will not function on AIX or SunOS. This
could be relatively easily fixed by someone with AIX knowledge in the
future, but SunOS will require some additional work to keep track if
the watchers.

A new test file, test/test-fork.c, was added to contain fork-related
tests to verify functionality in the child process.

PR-URL: https://github.com/libuv/libuv/pull/846
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

123