summaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
* New CMAKE option NNG_ENABLE_COMPAT (defaults ON)Garrett D'Amore2024-01-27
| | | | | | This option allows the compatibility code to be elided from the build. This saves build time, and eliminates bloat from a static library when used strictly in native NNG mode.
* Fix warning from inconsistent socket_pair prototype.Garrett D'Amore2024-01-06
|
* silence compiler warning from minimum int constantGarrett D'Amore2024-01-01
|
* fixes #1572 nng creates too many threadsGarrett D'Amore2024-01-01
| | | | | | | | | | | | This further limits some of the thread counts, but principally it offers a new runtime facility, nng_init_set_parameter(), which can be used to set certain runtime parameters on the number of threads, provided it is called before the rest of application start up. This facility is quite intentionally "undocumented", at least for now, as we want to limit our commitment to it. Still this should be helpful for applications that need to reduce the number of threads that are created.
* Comment typoGarrett D'Amore2024-01-01
|
* fixes #1751 Support nng_aio_set_expire().Garrett D'Amore2023-12-30
| | | | While here fixed a number of nits in comments.
* fixes #1740 Public ID hash APIGarrett D'Amore2023-12-29
| | | | | | | | | This includes a manual page documenting the entire set of functions in one step. The hash is 64-bit based for now, to be maximally flexible. An internal 32-bit convenience for the common internal use is also provided (not public). The public API includes a test suite.
* fixes #1746 Create a new socket:// transport for socketpair() based connectionsGarrett D'Amore2023-12-29
| | | | | | | | | | | | | This transport only listens, and creates connections when the application calls setopt on the lister with NNG_OPT_SOCKET_FD, to pass a file descriptor. The FD is turned into an nng_stream, and utilized for SP. The protocol over the descriptor is identical to the TCP protocol (not the IPC protocol). The options for peer information are borrowed from the IPC transport, as they may be useful for these purposes. This includes a test suite and full documentation.
* fixes #1729 remove nni_timerGarrett D'Amore2023-12-17
|
* fixes #1728 surveyor could be simplified to not use timerGarrett D'Amore2023-12-17
|
* fixes #1523 rare SEGV in sub nni_list_removeGarrett D'Amore2023-11-25
| | | | | | | | | | | | Credit goes to Wu Xuan (@willwu1217) for diagnosing and proposing a fix as part of #1695. This approach takes a revised approach to avoid adding extra memory, and it also is slightly faster as we do not need to update both pointers in the linked list, by reusing the reap node. As part of this a new internal API, nni_aio_completions, is introduced. In all likelihood we will be able to use this to solve some similar crashes in other areas of the code.
* fix: use ifdef for NNG_HAVE_BACKTRACEMarco Casaroli2023-11-25
| | | | | | | In some places, we use ifdef, and others if. This normalizes for always using ifdef, so we can compile when this macro is not defined.
* fix: use ifdef for NNG_ENABLE_STATSMarco Casaroli2023-11-25
| | | | | | | In some places, we use ifdef, and others if. This normalizes for always using ifdef, so we can compile when this macro is not defined.
* fixes #1619 expose expire threads tunablesPaulo Henrique Silva2023-08-27
| | | | | | | | | | | | | | | | | | This change makes expire threads tunable follows the same strategy as taskq threads tunables. Add NNG_NUM_EXPIRE_THREADS to override the default behavior (`n_cpu` expire threads). The NNG_MAX_EXPIRE_THREADS limit is always applied if > 0, even if you specify the desired number of threads using NNG_NUM_EXPIRE_THREADS. NNG_EXPIRE_THREADS is not used anymore. This was only referenced in the code but never defined on CMake. The logic to cap expire threads between 1 and 256 was removed. If users set no limits, whatever value they choose will be used instead of being silently overridden by us.
* fix copyrightsGarrett D'Amore2023-04-23
|
* fixes #1658 Possible use-after-free in dialerGarrett D'Amore2023-04-23
|
* fixes #1657 Use after free in listener (data race)Garrett D'Amore2023-04-23
|
* fixes #1619 Expose NNG_MAX_EXPIRE_THREADS via CMakeGarrett D'Amore2023-04-19
|
* Birth pipe object with non-zero reference.Garrett D'Amore2023-04-19
|
* fixes #1610 nni_sock_open() in socket.c: use after freeGarrett D'Amore2023-04-19
|
* Socket close may leak messages.Garrett D'Amore2023-02-07
| | | | | | We try to move the msgq close up earler. While here we can stop dropping and reacquiring the lock -- this is likely left over and may lead to races.
* Revert "fixes 1543 (#1616)"Garrett D'Amore2023-02-05
| | | | This reverts commit 8461c7207b440f5ba8c51b2236fcfa178f415a6f.
* Don't bump error counters for NNG_ECLOSED.Garrett D'Amore2023-02-05
|
* fixes 1543 (#1616)josh salit2023-02-05
| | | fixes #1543 by aborting tasks that may have been prepped, but not yet started.
* Update idhash.c (#1638)shikokuchuo2023-02-05
| | | Fix for UBSAN error. As `id_reg_map` is initialised as NULL and passing NULL to `memcpy()` is undefined. Should make no difference to compiled code. Purely to appease the automated checks I have to deal with on my side. Thanks!
* Silence NNI_ASSERT warnings when building with NDEBUG (#1621) (#1622)Ruben Valls2022-10-18
|
* Fixes compiling when NNG_ENABLE_STATS is OFF (#1600)Ruben Valls2022-06-20
| | | The socket member `st_name` is not available when NNG_ENABLE_STATS is OFF.
* fixes #1574 Non-blocking version of nng_aio_wait / nng_aio_resultGarrett D'Amore2022-04-18
| | | | | | | This introduces a new API, nng_aio_busy(), that can be used to query the status of the aio without blocking. Some minor documentation fixes are included.
* fixes #1577 nng_stat_find_socket always returns the same stats nodeGarrett D'Amore2022-04-16
| | | | | Also this fixes problems with uninitialized socket names, and the socket name stat not being adjusted correctly when set via API.
* Replace nni_aio_prov_set_extra with nni_aio_prov_set_data.Garrett D'Amore2021-12-31
| | | | | | This takes one less parameter, and is simpler. It will let us reclaim the aio_prov_extra data space as well, so that we can use it for other purposes.
* Fix leak of messages lost during device abort.Garrett D'Amore2021-12-29
|
* don't use deprecated functions in tests (#1560)Edward Rudd2021-12-29
|
* Introduce nng_device_aio().Garrett D'Amore2021-12-27
| | | | | | This function is like nng_device(), but runs asynchronously. Also, this fixes #1503 nng_device causes nng_close to blocking
* Socket and context initialization never fails.Garrett D'Amore2021-12-25
| | | | | This makes these functions entirely bullet proof, and eliminates yet more error handling cases.
* Provide a tiny buf for lmq buffer by default.Garrett D'Amore2021-12-25
| | | | | This allows us to make nni_lmq_init() non-failing. (Although the buffer size requested at initialization might not be granted.)
* Fix possible crash in allocation failure path for LMQ.Garrett D'Amore2021-12-25
|
* Pollables can be completely inline.Garrett D'Amore2021-12-25
| | | | | This eliminates more failure paths, and brings us still closer to eliminating the possibility of failure during socket init.
* Bus aio's can be inline.Garrett D'Amore2021-12-25
|
* fixes #1552 Several warnings compiling in Windows with Visual Studio 2019Garrett D'Amore2021-12-25
| | | | | Note that one of these warning is a real bug that would prevent TLS from functioning properly on Windows.
* Could use GCC atomics for older versions of GCC.Garrett D'Amore2021-12-08
| | | | | | | | This should help greatly with performance on older systems such as CentOS 7 and GCC 4.8. Though, such folks really should update to newer compilers. Folks running version of GCC earlier than 4.7 will still pay a rather significant performance penalty, as they still implement atomics with a global mutex.
* ID map static initialization support.Garrett D'Amore2021-12-06
| | | | This also arranges to clean up the maps at nng_fini time.
* Static condvar initialization.Garrett D'Amore2021-12-05
|
* Use static initialization for lists and mutexes.Garrett D'Amore2021-12-05
| | | | | | This eliminates some run-time initialization, moving it to compile time. Additional follow up work will expand on this to simplify initialization and reduce the need for certain locks.
* Provide atomic pointer support.Garrett D'Amore2021-12-05
| | | | | This is initially used for TLS to make loading the engine pointer faster, eliminating a much more expensive lock operation.
* fixes #1541 bug in nni_chunk_insertGarrett D'Amore2021-12-02
|
* Fix incorrect elides of deprecated code.Garrett D'Amore2021-11-29
| | | | | | (Note that this includes some incorrect formatting due to an apparent bug in clang-format 13. Hopefully they'll fix it later, but for now I'm preserving the bad whitespace.)
* fixes #1346 windows ipc winsec fails frequently in CI/CDGarrett D'Amore2021-11-02
|
* Remove unused eq_len member.Garrett D'Amore2021-10-11
|
* Minor cleanups.Garrett D'Amore2021-09-06
|
* Eliminate the pipe mutex and use atomic for pipe closed.Garrett D'Amore2021-09-06
| | | | | | | | | | This eliminates several mutex operations done each time a pipe is created or destroyed. For large scale systems this should reduce overall pressure on the memory subsystem, and scale better as many threads are coming and going. This also reduces the overall size of nni_pipe -- on Linux by 36 bytes typically.