History log of /libuv/src/unix/netbsd.c (Results 1 – 25 of 45)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 988d225c 24-Nov-2022 Tim Besard

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


# 6f696542 11-Nov-2022 theanarkh

misc: fix return value of memory functions (#3818)

Specifically uv_get_free_memory and uv_get_total_memory.


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, v1.34.2, v1.34.1
# 2ab3dc15 16-Dec-2019 David Carlier

unix: pass sysctl size arg using ARRAY_SIZE macro

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

unix: pass sysctl size arg using ARRAY_SIZE macro

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

show more ...

Revision tags: v1.34.0
# a62f8ced 21-Oct-2019 nia

netbsd: use KERN_ARND sysctl to get entropy

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

netbsd: use KERN_ARND sysctl to get entropy

PR-URL: https://github.com/libuv/libuv/pull/2528
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

Revision tags: v1.33.1, v1.33.0, v1.32.0
# 040543ee 17-Aug-2019 Santiago Gimeno

src: move uv_free_cpu_info to uv-common.c

PR-URL: https://github.com/libuv/libuv/pull/2433
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.co

src: move uv_free_cpu_info to uv-common.c

PR-URL: https://github.com/libuv/libuv/pull/2433
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: 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, v1.25.0, v1.24.1
# 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
# d0b15844 16-Oct-2018 Santiago Gimeno

core,bsd: refactor process_title functions

Use `setproctitle()` in `FreeBSD` as in the other `BSD` flavours.
Move `uv_setup_args()`, `uv_set_process_title()` and `uv_get_process_title()`

core,bsd: refactor process_title functions

Use `setproctitle()` in `FreeBSD` as in the other `BSD` flavours.
Move `uv_setup_args()`, `uv_set_process_title()` and `uv_get_process_title()` to
`bsd-proctitle.c` so it's used by the supported BSDs.

PR-URL: https://github.com/libuv/libuv/pull/2042
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@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 ...

Revision tags: v1.16.1, v1.16.0, v1.15.0
# 5fa0f0b6 09-Sep-2017 Kamil Rytarowski

netbsd: correct uv_exepath() on NetBSD

Setup proper sysctl(2) arguments in order to retrieve the executable
name.

Use an intermediate buffer beacause if it is too short, the sys

netbsd: correct uv_exepath() on NetBSD

Setup proper sysctl(2) arguments in order to retrieve the executable
name.

Use an intermediate buffer beacause if it is too short, the sysctl(2)
call will return error. With this intermediate buffer populate the outer
one.

Note issue with too long file names on NetBSD-8(beta), this is caused by
the current implementation of vnode to path translator in the kernel. It
does not cache longer file names than 31 character ones.

PR-URL: https://github.com/libuv/libuv/pull/1532
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

Revision tags: v1.14.1, v1.14.0, v1.13.1, v1.13.0
# 78c17238 01-Jul-2017 Matthew Taylor

unix: always copy process title into local buffer

Ensures that the user's argv is copied into a local buffer when calling
uv_setup_args. Before, the argv was simply being pointed to, whi

unix: always copy process title into local buffer

Ensures that the user's argv is copied into a local buffer when calling
uv_setup_args. Before, the argv was simply being pointed to, which
meant that libuv could end up accessing invalid memory if the user
decided to later edit the memory at that location. It also meant that a
subsequent call to uv_set_process_title would never write more
characters than the length of argv[0].

With the new changes, argv[0] is copied into a temporary buffer and any
subsequent calls to uv_set_process_title will thus be able to copy as
many characters as the call to uv__strdup permits. Note that on *BSD
and AIX this behaviour was already in effect .

Some error checking (specifically checking the result of uv__strdup)
has been added, and calls to uv__free rearranged so that in case of
ENOMEM uv__free can't be called erroneously.

Fixes: https://github.com/libuv/libuv/issues/1395
PR-URL: https://github.com/libuv/libuv/pull/1396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.12.0
# f277cb6f 21-Feb-2017 Brad King

unix: factor out reusable BSD ifaddrs impl

Create a dedicated source file to share among platforms on which we find
ifaddrs using the BSD getifaddrs API. De-duplicate our existing copie

unix: factor out reusable BSD ifaddrs impl

Create a dedicated source file to share among platforms on which we find
ifaddrs using the BSD getifaddrs API. De-duplicate our existing copies
of this implementation on such platforms.

PR-URL: https://github.com/libuv/libuv/pull/1240
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 0f84c305 18-Feb-2017 Brad King

unix: factor out getifaddrs result filter

On platforms using getifaddrs we iterate over the interfaces two or
three times. First we count them, then we enumerate them, and then we
f

unix: factor out getifaddrs result filter

On platforms using getifaddrs we iterate over the interfaces two or
three times. First we count them, then we enumerate them, and then we
fill in physical addresses. Each loop needs to do the same filtering,
so factor out the exclusion test into a helper function for each
platform.

PR-URL: https://github.com/libuv/libuv/pull/1240
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 80c4cf6b 18-Feb-2017 Brad King

unix: filter getifaddrs results consistently

We loop over getifaddrs results multiple times. Fix the filter
conditions to be consistent for all passes.

PR-URL: https://github.c

unix: filter getifaddrs results consistently

We loop over getifaddrs results multiple times. Fix the filter
conditions to be consistent for all passes.

PR-URL: https://github.com/libuv/libuv/pull/1240
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 2ba39be6 16-Feb-2017 Brad King

unix: factor out reusable POSIX hrtime impl

Create a dedicated source file to share among platforms on which we
implement hrtime using POSIX `clock_gettime`. De-duplicate our
existi

unix: factor out reusable POSIX hrtime impl

Create a dedicated source file to share among platforms on which we
implement hrtime using POSIX `clock_gettime`. De-duplicate our
existing copies of this implementation on such platforms.

PR-URL: https://github.com/libuv/libuv/pull/1239
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.11.0, v1.10.2, v1.10.1, v1.10.0
# 840a8c59 27-Jun-2016 cjihrig

unix,win: make uv_get_process_title() stricter

This commit causes uv_get_process_title() to:
- return EINVAL if the buffer is null or size is 0
- return ENOBUFS if the title is too

unix,win: make uv_get_process_title() stricter

This commit causes uv_get_process_title() to:
- return EINVAL if the buffer is null or size is 0
- return ENOBUFS if the title is too big for the buffer
- null terminate the buffer on success

Fixes: https://github.com/libuv/libuv/issues/315
PR-URL: https://github.com/libuv/libuv/pull/928
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v0.10.37, v1.9.1, v1.9.0, v1.8.0, v1.7.5
# 25c369d4 22-Sep-2015 Jianghua Yang

unix: fix memory leak in uv_interface_addresses

PR-URL: https://github.com/libuv/libuv/pull/537
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

Revision tags: v1.7.4, v1.7.3, v1.7.2, v1.7.1, v1.7.0, v1.6.1, v1.6.0
# bddd6a84 26-May-2015 Saúl Ibarra Corretgé

core: add ability to customize memory allocator

This patch is composed by the work done in
https://github.com/libuv/libuv/pull/231 and
https://github.com/libuv/libuv/pull/287 plus so

core: add ability to customize memory allocator

This patch is composed by the work done in
https://github.com/libuv/libuv/pull/231 and
https://github.com/libuv/libuv/pull/287 plus some changes by yours
truly.

Thanks @beevik and @mattsta for their work on this!

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

show more ...

Revision tags: v1.5.0
# 1f711e4d 29-Apr-2015 Saúl Ibarra Corretgé

Revert "memory: add uv_replace_allocator"

This reverts commit c272f1f1bc0bda625e6441d798c110b4064a6ce2.

The concept will come back to libuv, but it needs some more work.

# c272f1f1 26-Feb-2015 Brett Vickers

memory: add uv_replace_allocator

With uv_replace_allocator, it's possible to override the default
memory allocator's malloc and free calls with functions of the user's
choosing. This

memory: add uv_replace_allocator

With uv_replace_allocator, it's possible to override the default
memory allocator's malloc and free calls with functions of the user's
choosing. This allows libuv to interoperate with projects requiring a
custom memory allocator.

Internally, all calls to malloc and free have been replaced with
uv__malloc and uv__free, respectively. The uv__malloc and uv__free
functions call malloc and free unless they have been overridden by a
previous call to uv_replace_allocator.

As part of this change, the special aligned memory allocations
performed in src/win/fs-event.c have been replaced with standard
allocations. The 4-byte alignment being requested in this file was
unnecessary, since standard allocators already guarantee at least an
8-byte alignment.

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

show more ...

Revision tags: v0.10.36, v1.4.2, v0.10.35, v1.4.1, v0.10.34, v1.4.0, v1.3.0, v0.10.33
# 32747c75 20-Jan-2015 Andrius Bentkus

win,unix: move loop functions which have identical implementations

uv_default_loop, uv_loop_new, uv_loop_close, uv_loop_delete

PR-URL: https://github.com/libuv/libuv/pull/144
Re

win,unix: move loop functions which have identical implementations

uv_default_loop, uv_loop_new, uv_loop_close, uv_loop_delete

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

show more ...

Revision tags: v1.2.1, v1.2.0, v0.10.32
# afb31921 02-Jan-2015 Ben Noordhuis

unix: make uv_exepath(size=0) return UV_EINVAL

Make the behavior of a call to uv_exepath() with a size argument of zero
consistent with the Windows implementation where it returns UV_EIN

unix: make uv_exepath(size=0) return UV_EINVAL

Make the behavior of a call to uv_exepath() with a size argument of zero
consistent with the Windows implementation where it returns UV_EINVAL.

PR-URL: https://github.com/libuv/libuv/pull/104
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.1.0, v0.10.31, v1.0.2, v0.10.30, v1.0.1, v1.0.0, v0.10.29, v1.0.0-rc2, v1.0.0-rc1, v0.11.29
# 4dc0d81c 09-Aug-2014 Saúl Ibarra Corretgé

netbsd: fix build

Thanks @ezra1!

Closes #1391

Revision tags: v0.11.28, v0.11.27, v0.10.28, v0.11.26, v0.10.27, v0.11.25, v0.11.24, v0.11.23, v0.10.26, v0.11.22, v0.11.21, v0.11.20, v0.10.25, v0.11.19, v0.10.24, v0.11.18, v0.10.23, v0.10.22, v0.11.17, v0.10.21, v0.11.16, v0.10.20, v0.11.15, v0.10.19
# 21c37a7d 30-Oct-2013 Ben Noordhuis

linux: use CLOCK_MONOTONIC_COARSE if available

On some systems, clock_gettime(CLOCK_MONOTONIC) is only serviced from
the vDSO when the __vdso_clock_gettime() wrapper is confident enough

linux: use CLOCK_MONOTONIC_COARSE if available

On some systems, clock_gettime(CLOCK_MONOTONIC) is only serviced from
the vDSO when the __vdso_clock_gettime() wrapper is confident enough
that the vDSO timestamp is highly accurate. When in doubt, it falls
back to making a traditional SYS_clock_gettime system call with all
the overhead that entails.

While a commendable approach, it's overkill for our purposes because we
don't usually need high precision time. That's why this commit switches
to CLOCK_MONOTONIC_COARSE for low-precision timekeeping, provided said
clock has at least a one millisecond resolution.

This change should eliminate the system call on almost all systems,
including virtualized ones, provided the kernel is >= 2.6.32 and glibc
is new enough to find and parse the vDSO.

show more ...

12