| 5e36f4ab | 06-Nov-2025 |
Patrick Williams <patrick@stwcx.xyz> |
async: remove tag_invoke calls
P2300R9 removed usage of tag_invoke. stdexec still has it but in order to be forward compliant with the C++26 standard we should modernize the code and remove its usa
async: remove tag_invoke calls
P2300R9 removed usage of tag_invoke. stdexec still has it but in order to be forward compliant with the C++26 standard we should modernize the code and remove its usage. This also has the benefit of simplifying most sender/receiver implementations.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib0a1d0a82485c8d247a18daa020d0bba2249e95c
show more ...
|
| bd04c3b2 | 07-Jul-2025 |
Jagpal Singh Gill <paligill@gmail.com> |
add support for async mutex
Add support for async mutex for synchronizing coroutines/tasks using sender receiver framework. Also, add lock_guard support which provides a RAII wrapper for mutex to ow
add support for async mutex
Add support for async mutex for synchronizing coroutines/tasks using sender receiver framework. Also, add lock_guard support which provides a RAII wrapper for mutex to own it for the duration of a scoped block.
Tested: Add Unit Test using gtest ``` 1/1 test_async_mutex OK 2.01s
Ok: 1 Expected Fail: 0 Fail: 0 Unexpected Pass: 0 Skipped: 0 Timeout: 0 ```
Change-Id: I691528885a94b9cf55d4b7f2fb0c1e0e6d0ab84f Signed-off-by: Jagpal Singh Gill <paligill@gmail.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 5b543251 | 22-Jul-2025 |
Jagpal Singh Gill <paligill@gmail.com> |
add support for timed fdio
For certain operations such as reading and writing to a fd for request response flows, the fd needs to have a timeout to avoid everlasting hangs in case of a unresponsive
add support for timed fdio
For certain operations such as reading and writing to a fd for request response flows, the fd needs to have a timeout to avoid everlasting hangs in case of a unresponsive responder. To support this, the fdio has been extended to add timeout support by throwing an exception in case of timeout.
Tested: Unit Test ``` 1/1 test_async_fdio_timed OK 10.03s
Ok: 1 Expected Fail: 0 Fail: 0 Unexpected Pass: 0 Skipped: 0 Timeout: 0 ```
Change-Id: Ib219e4a4c55125785e6c1571488e445ba3379244 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
| bc139974 | 08-Jul-2025 |
Patrick Williams <patrick@stwcx.xyz> |
watchdog: add support for systemd watchdog
Add interfaces and handling for systemd watchdog petting.
Systemd service files can specify a watchdog timeout and systemd will expect the application to
watchdog: add support for systemd watchdog
Add interfaces and handling for systemd watchdog petting.
Systemd service files can specify a watchdog timeout and systemd will expect the application to periodically poke a software watchdog, or else the service will be restarted. This is enabled with the 'WatchdogSec=' service file directive. Add primitives for interacting with the watchdog APIs.
Enable automatic support in the `async::context` for this watchdog handling, such that if the watchdog is required (by checking sd_watchdog_enabled) the daemon will automatically pet at the appropriate rate, assuming that the `async::context` is functioning correctly.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I68caf7b2c7166ca402b07ecee3db65f75365aa72
show more ...
|
| 36137e09 | 18-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have b
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have been deprecated, so adjust the style file accordingly.
See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style. See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.
Change-Id: I65cb0501917fee37f007ed97ce973e0dd07170fa Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| f083bc1a | 16-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
stdexec: update to latest commit
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I93e33afb0ca87f425074e86f87e6cde320f20dbc |
| 869230c6 | 12-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
async: fdio: remove unused member
clang warns about an unused private field ('fd') because it is a capture-only member. There isn't any reason to keep the fd around once the underlying sd_event has
async: fdio: remove unused member
clang warns about an unused private field ('fd') because it is a capture-only member. There isn't any reason to keep the fd around once the underlying sd_event has been created, so remove it as a member.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I176b2c4b53bbd7e4bb4bc9a9594f5816ee1bda2e
show more ...
|
| 2a12ae12 | 23-Oct-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
add async fd sender receiver for coroutines
Add async sender receiver for file descriptor based events. The user of the async file descriptor needs to initialize a fdio instance and then call next()
add async fd sender receiver for coroutines
Add async sender receiver for file descriptor based events. The user of the async file descriptor needs to initialize a fdio instance and then call next() to get each new event for the fd.
Tested: ``` > meson test -C builddir test_async_fdio ninja: Entering directory `/host/repos/sdbusplus/builddir' ninja: no work to do. 1/1 test_async_fdio OK 6.01s
Ok: 1 Expected Fail: 0 Fail: 0 Unexpected Pass: 0 Skipped: 0 Timeout: 0
Full log written to /host/repos/sdbusplus/builddir/meson-logs/testlog.txt ```
Change-Id: I1b4f16963e6096f30484c4a6df471e64ed24448b Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
| 06f265f6 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I4f63258febea27dae710c252033b9151e02be7e8 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| e8e6631b | 01-Dec-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: context: use transfer instead of schedule
Later revisions of the stdexec proposal added a `transfer` method that allows us to reduce 1 co_await.
Signed-off-by: Patrick Williams <patrick@stwc
async: context: use transfer instead of schedule
Later revisions of the stdexec proposal added a `transfer` method that allows us to reduce 1 co_await.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If43877a85254b5572cc2a3a1cacdf6b580870b5a
show more ...
|
| bbc181e3 | 16-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: context: clean up TODO
The latest version of stdexec cleans up an issue we were seeing that was marked with a TODO. Switch from a complicated task structure back to the simple `task<>`.
Sig
async: context: clean up TODO
The latest version of stdexec cleans up an issue we were seeing that was marked with a TODO. Switch from a complicated task structure back to the simple `task<>`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ibe2a73b1e7d172f829308a12c88749db43354e83
show more ...
|
| 6db88387 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I1d7d35c8035993df4c164bfb055d3be476d3ea84 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 1ee60d6d | 18-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: context: add implicit conversion to bus_t
Many existing sdbusplus library calls expect a `bus_t`. Add an implicit conversion to `bus_t&` so that a `context_t&` can be passed into any functio
async: context: add implicit conversion to bus_t
Many existing sdbusplus library calls expect a `bus_t`. Add an implicit conversion to `bus_t&` so that a `context_t&` can be passed into any function that formerly accepted a `bus_t&`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I791bf88d86ba5761a4d2fa9bf811b6e794b097af
show more ...
|
| 4a9e4221 | 18-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: add context_ref class for CRTP patterns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6364f6f5a654ec0c628112637014ae2daed5d740 |
| 9d8ba947 | 13-Jul-2023 |
William A. Kennington III <wak@google.com> |
bus: Consistently leverage mock
We have some project generating matches that are using the mock. Previously, we never checked the return value of this function and it allowed our match creations to
bus: Consistently leverage mock
We have some project generating matches that are using the mock. Previously, we never checked the return value of this function and it allowed our match creations to silently fail. With error checking added, this was breaking unit tests.
This change makes sure that all users of slot generating functions have their calls properly mocked.
Change-Id: I5dab3e3ae73e8516db21c928fc39bc00d4218c82 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
| 9c6ec9b3 | 23-Jun-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: add is_sender type-aliases
The latest version of stdexec requires all sender types to include a type alias `is_sender` (which their examples all set to `void`) or else a unique overload of a
async: add is_sender type-aliases
The latest version of stdexec requires all sender types to include a type alias `is_sender` (which their examples all set to `void`) or else a unique overload of a stdexec template. Add the type alias to all of our defined sender types.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2229905703b0f9c360d0fa5f1ba6acffd1f22a02
show more ...
|
| 5d16a8ed | 25-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: context: remove pending_exception handling
With the move from scope to exec::async_scope there is no possibility for pending-exceptions so clean up all the associated code.
Signed-off-by: Pa
async: context: remove pending_exception handling
With the move from scope to exec::async_scope there is no possibility for pending-exceptions so clean up all the associated code.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6f110d0641b9ba566e480f8e43eb90976e2b3c93
show more ...
|
| 97c31c82 | 25-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: switch to stdexec async_scope
Use the `async_scope` implementation from stdexec instead of the custom `scope` class here, which greatly reduces our own code and also aligns better with the C+
async: switch to stdexec async_scope
Use the `async_scope` implementation from stdexec instead of the custom `scope` class here, which greatly reduces our own code and also aligns better with the C++ STL direction. The major changes are around exception paths:
- Spawned tasks which end with an exception will now std::terminate, so any task expected to throw should have an `upon_error` chain.
- Spawned tasks which are stopped will be no longer throw an `UnexpectedStop` exception, so they should be chained with an `upon_stopped` if this is important.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4e0c85712652efa5b296b898dcc2b0026ba4c625
show more ...
|
| d2149044 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I5daa012bf76924eb7a7d22ed31b6b77ad2f723df Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 91cb97b5 | 05-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
async: change namespace for sync_wait
Upstream stdexec moved the sync_wait from the `stdexec::this_thread` namespace directly into `stdexec`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Cha
async: change namespace for sync_wait
Upstream stdexec moved the sync_wait from the `stdexec::this_thread` namespace directly into `stdexec`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9a28b4c5920d0f9892ba466d919fd29f2397f64a
show more ...
|
| 5e7ef083 | 05-Jan-2023 |
Patrick Williams <patrick@stwcx.xyz> |
stdexec: update to later commit
The upstream code has done some namespace changes. Point to a commit in that timeframe and fix up the local usages in order to compile successfully.
Signed-off-by:
stdexec: update to later commit
The upstream code has done some namespace changes. Point to a commit in that timeframe and fix up the local usages in order to compile successfully.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5a21ccd0774ee5cd22d45c9a425e43560734a571
show more ...
|
| b8be599f | 04-Jan-2023 |
Ed Tanous <edtanous@google.com> |
Remove extra semi-colons
A couple functions had extra semi-colons, which clang -Weverything flags. Remove them.
Change-Id: I2b44444c3184817dd0035c62b5ae114254457398 Signed-off-by: Ed Tanous <edtan
Remove extra semi-colons
A couple functions had extra semi-colons, which clang -Weverything flags. Remove them.
Change-Id: I2b44444c3184817dd0035c62b5ae114254457398 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
| 115e9b3d | 23-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: context: allow many exceptions
Allow many spawned tasks to throw exceptions and queue them up, re-throwing them one-by-one from `context::run` calls. Similarly enhance `context::scope` so th
async: context: allow many exceptions
Allow many spawned tasks to throw exceptions and queue them up, re-throwing them one-by-one from `context::run` calls. Similarly enhance `context::scope` so that many `context::empty` completions can complete with error.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8744e0a3b8b0663ebd5ca26db0f5943688afe62a
show more ...
|
| 10483c94 | 23-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: context: allow run re-entrance
Switch the context call so that it can be re-entrant. A single call to `run` will either:
1. Process until the context is successfully stopped. 2. An
async: context: allow run re-entrance
Switch the context call so that it can be re-entrant. A single call to `run` will either:
1. Process until the context is successfully stopped. 2. An exception is raised from a spawned task.
If an exception is raised, it could be caught outside the run call and then run called again.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Icd05df421a1f0592bd2390fbe8e21a16252eafed
show more ...
|
| 3c242ba4 | 23-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: context: simplify run function
Since we already have a `spawn` function to add async tasks, get rid of the special "startup" task send to run. Instead users should pass the start up work to
async: context: simplify run function
Since we already have a `spawn` function to add async tasks, get rid of the special "startup" task send to run. Instead users should pass the start up work to spawn and call run with no parameters.
Eventually this will allow us to exit the run-loop for any and all exceptions from the async context and potentially allow a caller to re-enter the `run` loop after handling the child exception.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia0e09a2493f0554538315d1d0c238aa11cb44e39
show more ...
|