History log of /libuv/src/unix/os390-syscalls.c (Results 1 – 25 of 28)
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 ...


# 27eec099 29-Jun-2022 Wayne Zhang

zos: fix early exit of epoll_wait() (#3653)

This fixes an early exit bug in z/OS implementation of epoll_wait(),
resulting in some file events not being correctly captured.

The

zos: fix early exit of epoll_wait() (#3653)

This fixes an early exit bug in z/OS implementation of epoll_wait(),
resulting in some file events not being correctly captured.

The problem is that reventcount should only be incremented by 1, because
_NFDS counts as 1 even for fds with multiple revents set.

Also makes a few minor improvements to remove redundant checks.

Co-authored-by: Igor Todorovski <itodorov@ca.ibm.com>

show more ...


# 0a47e4c7 03-Dec-2021 Wayne Zhang

zos: use destructor for uv__threadpool_cleanup() (#3376)

On z/OS, instead of calling the uv__threadpool_cleanup() function from
inside uv_library_shutdown(), the destructor attribute mus

zos: use destructor for uv__threadpool_cleanup() (#3376)

On z/OS, instead of calling the uv__threadpool_cleanup() function from
inside uv_library_shutdown(), the destructor attribute must be used;
otherwise, tests will fail with exit code 1 and no output. Additionally,
post() does not need to be called when the destructor attribute is used.

Also adds uv__os390_cleanup() function to clean System V message queue
on z/OS.

Co-authored-by: Igor Todorovski <itodorov@ca.ibm.com>
Co-authored-by: Gaby Baghdadi <baghdadi@ca.ibm.com>

show more ...


# 97709e18 03-Mar-2021 Yash Ladha

chore: use for(;;) instead of while

In the codebase we have used empty for loop for infinite conditions, so
to bring consistency replaced other occurrences of while in the codebase
w

chore: use for(;;) instead of while

In the codebase we have used empty for loop for infinite conditions, so
to bring consistency replaced other occurrences of while in the codebase
with for loop.

PR-URL: https://github.com/libuv/libuv/pull/3128
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.41.0, v1.40.0
# 4f36c89c 02-Sep-2020 Shuowang (Wayne) Zhang

zos: use nanosleep() from zoslib

Since `nanosleep()` is implemented in ZOSLIB, we will remove the libuv
implementation to resolve conflict. The ZOSLIB implementation uses
BPX4CTW (co

zos: use nanosleep() from zoslib

Since `nanosleep()` is implemented in ZOSLIB, we will remove the libuv
implementation to resolve conflict. The ZOSLIB implementation uses
BPX4CTW (cond_timed_wait).

PR-URL: https://github.com/libuv/libuv/pull/3060
Reviewed-By: Richard Lau <rlau@redhat.com>

show more ...


# aef67e55 01-Sep-2020 Shuowang (Wayne) Zhang

zos: use strnlen() from zoslib

Since `strnlen()` is implemented in ZOSLIB, we will remove the libuv
implementation to resolve conflict. The ZOSLIB implementation uses asm.

PR-UR

zos: use strnlen() from zoslib

Since `strnlen()` is implemented in ZOSLIB, we will remove the libuv
implementation to resolve conflict. The ZOSLIB implementation uses asm.

PR-URL: https://github.com/libuv/libuv/pull/3060
Reviewed-By: Richard Lau <rlau@redhat.com>

show more ...


Revision tags: v1.39.0, v1.38.1
# c70dd705 16-Jun-2020 Ben Noordhuis

unix: use relaxed loads/stores for feature checks

Make ThreadSanitizer stop complaining about the static variables that
libuv uses to record the presence (or lack) of system calls and ot

unix: use relaxed loads/stores for feature checks

Make ThreadSanitizer stop complaining about the static variables that
libuv uses to record the presence (or lack) of system calls and other
kernel features.

Fixes: https://github.com/libuv/libuv/issues/2884
PR-URL: https://github.com/libuv/libuv/pull/2886
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


Revision tags: v1.38.0, v1.37.0, v1.36.0
# 875a4fe6 17-Mar-2020 Richard Lau

zos: fix return value on expired nanosleep() call

In the emulated nanosleep() function on z/OS an EAGAIN error from
BPX1CTW/BPX4CTW indicates that the timeout has expired. In that
ca

zos: fix return value on expired nanosleep() call

In the emulated nanosleep() function on z/OS an EAGAIN error from
BPX1CTW/BPX4CTW indicates that the timeout has expired. In that
case return 0 and not -1.

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

show more ...


# a9c58e72 17-Mar-2020 Richard Lau

zos: fix non-Release builds

z/OS doesn't support POSIX semaphores. On Release builds the code
paths that reference POSIX semaphore functions (e.g. sem_init())
are optimized away so l

zos: fix non-Release builds

z/OS doesn't support POSIX semaphores. On Release builds the code
paths that reference POSIX semaphore functions (e.g. sem_init())
are optimized away so linking succeeds but on a non-Release build
the references to the unavailable functions result in unresolved
symbol errors.

Stub the unavailable POSIX semaphore functions on z/OS as so the
code can link on non-Release builds.

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

show more ...


Revision tags: v1.35.0
# 1bcfbfd0 10-Mar-2020 Ben Noordhuis

src: add uv__reallocf()

Modeled after FreeBSD's `reallocf(3)`: a version of `realloc(3)` that
frees the memory when reallocation fails, simplifying error handling in
many cases.

src: add uv__reallocf()

Modeled after FreeBSD's `reallocf(3)`: a version of `realloc(3)` that
frees the memory when reallocation fails, simplifying error handling in
many cases.

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

show more ...


# 506e4bee 15-Mar-2020 Irek Fakhrutdinov

zos: add checks to ensure behavior of epoll_wait

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

zos: add checks to ensure behavior of epoll_wait

PR-URL: https://github.com/libuv/libuv/pull/2013
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Signed-off-by: Irek Fakhrutdinov <ifakhrutdinov@rocketsoftware.com>

show more ...


# 7d988e07 15-Mar-2020 Irek Fakhrutdinov

zos: move mq check out of loop to save cpu cycles

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

zos: move mq check out of loop to save cpu cycles

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

show more ...


# f0673405 15-Mar-2020 Irek Fakhrutdinov

zos: explicitly mark message queue events

The os390 epoll_wait implementation uses poll() to detect events in
both file descriptors and the message queue used for file system
events.

zos: explicitly mark message queue events

The os390 epoll_wait implementation uses poll() to detect events in
both file descriptors and the message queue used for file system
events. The only message queue ID is always placed at the end of the
array passed to the poll() call. When the poll() call returns all FDs
and the message queue are checked for events by iterating through that
array. In order to distinguish the message queue from the FDs its ID
value is compared with the only message queue ID we have and if it
matches the message queue handler function is called.

When the message queue ID is relatively small, it may have the same
value as the value of one of the file descriptors. If this happens,
the message queue handler is called for the matching file descriptor,
and this call fails. The file descriptor ends up being unhandled and
this makes the next poll() call to return immediately. Eventually this
will happen again and again, leading to an infinite busy loop and high
CPU usage.

To prevent the incorrect interpretation of file descriptors as the
message queue, a new field has been added to the epoll event struct.
This field is checked instead of the ID value and the message queue
handler function is never called for file descriptors.

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

show more ...


# a9974da0 10-Mar-2020 Ben Noordhuis

zos: fix scandir() error path NULL pointer deref

Commit b5155dd2 ("zos: return on realloc failure in scandir()")
introduced a bug where `nl` is dereferenced when it's NULL after
real

zos: fix scandir() error path NULL pointer deref

Commit b5155dd2 ("zos: return on realloc failure in scandir()")
introduced a bug where `nl` is dereferenced when it's NULL after
reallocation fails.

PR-URL: https://github.com/libuv/libuv/pull/2734
Refs: https://github.com/libuv/libuv/pull/2693
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

show more ...


# b5155dd2 10-Mar-2020 Milad Farazmand

zos: return on realloc failure in scandir()

Fixes: https://github.com/libuv/libuv/issues/2692
PR-URL: https://github.com/libuv/libuv/pull/2693
Reviewed-By: Ben Noordhuis <info@bnoord

zos: return on realloc failure in scandir()

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

show more ...


Revision tags: v1.34.2, v1.34.1, v1.34.0
# 635e0ce6 03-Dec-2019 Ben Noordhuis

zos: fix nanosleep() emulation

* Remove an assert() that wasn't actually being tested because the CI
builds libuv with `-DNDEBUG` on that platform.

* Fix the emulation to upda

zos: fix nanosleep() emulation

* Remove an assert() that wasn't actually being tested because the CI
builds libuv with `-DNDEBUG` on that platform.

* Fix the emulation to update `errno` correctly.

* Fix the emulation to update the `rem` out parameter correctly.

PR-URL: https://github.com/libuv/libuv/pull/2552
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.33.1, v1.33.0, v1.32.0, v1.31.0, v1.30.1, v1.30.0, v1.29.1, v1.29.0, v1.28.0, v1.27.0, v1.26.0, v1.25.0, v1.24.1, v1.24.0, v1.23.2, v1.23.1, v1.23.0, v1.22.0, v1.21.0
# 71bb0cc2 06-Jun-2018 John Barboza

zos: use correct pointer type in strnlen

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

# 07039d74 06-Jun-2018 John Barboza

zos: write-protect message queue

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

# 844fb92b 06-Jun-2018 John Barboza

zos: clear poll events on every iteration

This is required because `poll` will not reset the flags which it isn't
polling itself.

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

zos: clear poll events on every iteration

This is required because `poll` will not reset the flags which it isn't
polling itself.

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

show more ...

Revision tags: v1.20.3
# 5f5d19d9 26-Apr-2018 John Barboza

zos: initialize pollfd revents

If not initialized to zero, revents could carry dirty bits in the
output from poll.

PR-URL: https://github.com/libuv/libuv/pull/1820
Reviewed-

zos: initialize pollfd revents

If not initialized to zero, revents could carry dirty bits in the
output from poll.

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

show more ...

Revision tags: v1.20.2, v1.20.1, v1.20.0, v1.19.2, v1.19.1, v1.19.0, v1.18.0, v1.17.0, v1.16.1, v1.16.0, v1.15.0, v1.14.1, v1.14.0, v1.13.1, v1.13.0, v1.12.0
# b01de734 10-Apr-2017 John Barboza

zos: implement uv_fs_event* functions

This commit uses the Register File Interest feature on z/OS
to enable users to monitor file system events.
The poll call is used to check for fi

zos: implement uv_fs_event* functions

This commit uses the Register File Interest feature on z/OS
to enable users to monitor file system events.
The poll call is used to check for file descriptors as well
as a message queue that z/OS will report file system events
on. The last item on the list used by poll will contain the
message queue id instead of a file descriptor.

Limitation:
Writes to a directory (that is, file creation and deletion)
do not generate a change message for a registered directory.

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

show more ...

# 88d716e1 17-Nov-2017 John Barboza

zos: add strnlen() implementation

Add an implementation of strnlen() which is not provided by default.

PR-URL: https://github.com/libuv/libuv/pull/1631
Reviewed-By: Ben Noordhui

zos: add strnlen() implementation

Add an implementation of strnlen() which is not provided by default.

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

show more ...

# 44b7c710 21-Aug-2017 John Barboza

zos: reset epoll data after fork

Remove all the epoll file descriptors after a fork since they are
no longer valid. The uv__signal_global_once_init function needs to
be run after uv_

zos: reset epoll data after fork

Remove all the epoll file descriptors after a fork since they are
no longer valid. The uv__signal_global_once_init function needs to
be run after uv__platform_loop_init so that the epoll pthread_atfork
handlers get run first.

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

show more ...

# 8d3645a1 11-Aug-2017 John Barboza

zos: fix readlink for mounts with system variables

On z/OS, fs mounts can have variables starting with '$'. The problem is
that following symlinks that contain these variables can lead t

zos: fix readlink for mounts with system variables

On z/OS, fs mounts can have variables starting with '$'. The problem is
that following symlinks that contain these variables can lead to a loop
because readlink($SYSVAR) will return $SYSVAR. To work around this, we
must resolve the $SYSVAR to an actual path using realpath.

More information about z/OS symlink resolution is available here:

https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/
com.ibm.zos.v2r1.bpxb100/sym.htm

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

show more ...

# 24334e07 23-Sep-2017 John Barboza

zos: lock protect global epoll list in epoll_ctl

This will eliminate a race condition that occurs between
epoll_close_fd, epoll_ctl and epoll_create in the
signal_multiple_loops test

zos: lock protect global epoll list in epoll_ctl

This will eliminate a race condition that occurs between
epoll_close_fd, epoll_ctl and epoll_create in the
signal_multiple_loops test.

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

show more ...

12