c5b5ff57 | 21-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: scope: add completion sender
Add a mechanism to await the completion of an async::scope, equivalent to a 'join' on the spawned tasks it contains.
Signed-off-by: Patrick Williams <patrick@stw
async: scope: add completion sender
Add a mechanism to await the completion of an async::scope, equivalent to a 'join' on the spawned tasks it contains.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I669680441704cdb59aa982d97bed610178c498b9
show more ...
|
0139cac7 | 20-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: add scope
In order to be able to create multiple subtasks as a collection and in order to make sure we keep good track of any tasks that are created by the context, add a `scope` as a contain
async: add scope
In order to be able to create multiple subtasks as a collection and in order to make sure we keep good track of any tasks that are created by the context, add a `scope` as a container of subtasks. This is partially modelled after the C++ P2519 proposal.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6e99b2fa2829d80c320491991f7e038f122963a9
show more ...
|
435eb1bd | 16-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: add sleep_for sender
Sometimes it is useful to do the equivalent of `std::this_thread::sleep_for` in a co-routine context. Add a sender-based implementation to async.
Signed-off-by: Patrick
async: add sleep_for sender
Sometimes it is useful to do the equivalent of `std::this_thread::sleep_for` in a co-routine context. Add a sender-based implementation to async.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9991eb40b7a1b12e61511f1200bc99fdcdbccf0a
show more ...
|
3ce3159b | 16-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
event: add oneshot timer support
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9785fa52e38202821258ad162e6f9168c71e53f7 |
73e278b5 | 16-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: context: support stopping the context
Up until this point, the async::context would run forever and have no way of exiting the process, which isn't very useful. Add some support for stop con
async: context: support stopping the context
Up until this point, the async::context would run forever and have no way of exiting the process, which isn't very useful. Add some support for stop conditions so that we can ask the context to stop and cleanly exit.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia5967162fb103d4b4b0490d8cbbef12bdb361bac
show more ...
|
d2b00440 | 16-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
event: add a simple wrapper around sd-event
In order to facilitate stop-conditions on the async::context, we need to be able to escape the wait on the dbus fd. sd-event will allow us to do this and
event: add a simple wrapper around sd-event
In order to facilitate stop-conditions on the async::context, we need to be able to escape the wait on the dbus fd. sd-event will allow us to do this and also build other co-routine primitives in the future (such as `co_await async::delay(1s)` backed by sd-event timers). Define a simple wrapper around sd-event here which can be leveraged by the async framework.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I945416cbce3c98d98135c42cb7ca249a57cb9a60
show more ...
|
290fa427 | 29-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: add match
Define a class which will register for a dbus signal match and generate Senders that await new signals.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib1d77708d74e
async: add match
Define a class which will register for a dbus signal match and generate Senders that await new signals.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib1d77708d74e6063bcaa08fc76fb98667ee7a2cb
show more ...
|
10010b19 | 28-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: add client-object proxy
Add a class which acts as a client-side proxy to a object. The proxy holds the object address (service, path, interface) and creates Senders for standard dbus operati
async: add client-object proxy
Add a class which acts as a client-side proxy to a object. The proxy holds the object address (service, path, interface) and creates Senders for standard dbus operations: method-call, get-property, set-property, get-all-properties. These Senders can also be used in co-routine contexts (via co_await).
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4b2e50a8b55d10975984ac4244bb075db8746fbf
show more ...
|
74187667 | 26-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: add context support
In order to handle async operations, we need some kind of 'run-loop' around the sd_bus_wait/sd_bus_process process. Define a 'context' to hold the bus and manage the run-l
async: add context support
In order to handle async operations, we need some kind of 'run-loop' around the sd_bus_wait/sd_bus_process process. Define a 'context' to hold the bus and manage the run-loop.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I16099dd2e15809776827dd85327d950af3f8f5b2
show more ...
|
2f58b791 | 26-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
async: add coroutine task support
Add sdbusplus::async::task<...> template which works with the std::executors proposal (P2300) and test-cases.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> C
async: add coroutine task support
Add sdbusplus::async::task<...> template which works with the std::executors proposal (P2300) and test-cases.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie63791daeab90ae1cc3862bb30878531b1775fa7
show more ...
|
5b5d15b3 | 23-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
std::execution: import from p2300 prototype
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I47725915b544af2b71ce0f423f70f453f8bcbc39 |
1778b12b | 13-Sep-2021 |
Ed Tanous <edtanous@google.com> |
Allow clients to disable coroutine support
This commit allows clients to opt out of the boost coroutines in asio::connection. This was added later after the initial development of the asio bindings
Allow clients to disable coroutine support
This commit allows clients to opt out of the boost coroutines in asio::connection. This was added later after the initial development of the asio bindings, and imposes unfortunate handler requirements upon clients, namely, that boost coroutines will not compile when exceptions have been disabled via -fno-exceptions. For clients wishing to disable exceptions, this is unfortunate, and prevents binary size optimizations like: https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/46841
Therefore, this patchset allows clients to define SDBUSPLUS_DISABLE_BOOST_COROUTINES which prevents sdbusplus::asio::connection from pulling in boost/asio/spawn.hpp, and disallows the use of yield_method_call (which requires a yield context).
Tested: Compiled with https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/46841 and observed a good build. See the aforementioned patchset for why this is useful, but TL;DR, it reduced the binary size of bmcweb by ~30% for no lost user-facing functionality.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I5339c3ff288b333fb0466fb2e6ac00f5b65964b4
show more ...
|
41f42f6b | 30-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update with latest
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I19356ecda2940a32661f54c0b54c74acc891f9c4 |
6a38ed5e | 04-Oct-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
asio/object_server: Use nullptr
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Ia38e1b7509c65fe065e1bbd1fa5f04da6355ed46 |
26b3ff9c | 04-Oct-2022 |
Brad Bishop <bbishop1@lenovo.com> |
Fix instances of extra-semi
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I233bd736375e8fce3646232dd6d101989d941f4d |
1a25a10d | 29-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update whitespace penalty
clang-format-15 seems to end up with a slightly different whitespace break than clang-format-14 did. Tweak the PenaltyBreakAssignment to favor not breaking a
clang-format: update whitespace penalty
clang-format-15 seems to end up with a slightly different whitespace break than clang-format-14 did. Tweak the PenaltyBreakAssignment to favor not breaking as often, which allows the two to be more consistent.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I49826e2011bce317b6b82dc985ddd35fa6eef2cb
show more ...
|
5a6c7902 | 29-Sep-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
asio: fix instances of unused-exception-parameter
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Ibbcea5805e4916820f797988b9b95a92e6fe2823 |
0eda6ebf | 29-Sep-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
Fix inconsistent-missing-destructor-override
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I1fcfcaf4b41319d7a0b11fb937df06bec41d7620 |
e8c7614c | 29-Sep-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
bus.hpp: fix missing-noreturn
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I734ec4f690c5a162e55ab1b69ac6b6139d942781 |
d86b2a0a | 29-Sep-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
Fix instances of zero-as-null-pointer-constant
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I87e5e39202520bd7b6066fc6444362f32659049f |
37d48a0a | 21-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
match: more string_view improvements
- It has been suggested that `string_view` is better than `const string_view&`[1]. Switch all calls to that type.
- In some cases the optimizations usi
match: more string_view improvements
- It has been suggested that `string_view` is better than `const string_view&`[1]. Switch all calls to that type.
- In some cases the optimizations using string_view allowed non-zstrings to be passed to sdbus calls without compiler warning. Revert back to sacrificing the slight performance of constructing the string for safety.
[1]: https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I21a542fc9264b0f998e1c234064b6e6414327b82
show more ...
|
4fbda946 | 01-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
match: constexpr, noexcept, string_view-ify
Optimize the bus::match interfaces:
Add constexpr and noexcept markers on all functions which can be done so, which potentially makes the resulti
match: constexpr, noexcept, string_view-ify
Optimize the bus::match interfaces:
Add constexpr and noexcept markers on all functions which can be done so, which potentially makes the resulting binaries smaller.
Switch parameters and return values to string_view whenever possible, which also makes resulting binaries smaller.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I0a863b8a16349123d42011e08ab0d0464ea11548
show more ...
|
a141477d | 20-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
.gitignore: remove vim and update python
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Idfffe485440ced20dd1a772e0cf2a4334da06f7a |
69e2b298 | 19-Sep-2022 |
Ed Tanous <edtanous@google.com> |
Combine owned strings
There are two lists in object_server for storing strings that need their lifetime extended for both methods and signal names. Neither list is used independently, and exists en
Combine owned strings
There are two lists in object_server for storing strings that need their lifetime extended for both methods and signal names. Neither list is used independently, and exists entirely just to store strings to give the vtables something to point to, so there's no sense in keeping two lists.
As some point, these could arguably become static sets, so that strings memory footprints are deduplicated between interfaces in the same daemon, but that is a more invasive change.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ie676a4ffb524387abf12a0ed20f50d109c85bc58
show more ...
|
4ecc47b9 | 19-Sep-2022 |
Ed Tanous <edtanous@google.com> |
Use built-in sd-bus methods for member name check
sd-bus has built-in methods for verifying member names that do a better job checking than the method that was created here. Use them.
Signed-off-b
Use built-in sd-bus methods for member name check
sd-bus has built-in methods for verifying member names that do a better job checking than the method that was created here. Use them.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I5b5389abf7f3033f3f4de344118bf9049d81be66
show more ...
|