diff options
author | Tom Rini <trini@konsulko.com> | 2025-05-16 11:05:27 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-05-16 11:05:27 -0600 |
commit | 126a88d49bcae04bbfc0d6723097cd6341355ade (patch) | |
tree | fbcd1e0d77448c1f604b2c2ecb668fdf3efa0c1b /doc/develop | |
parent | 9cd88f0eab903997754b2f9e021156b6084052ee (diff) | |
parent | 6f0a3cd7bcdd4ce25b5ad253a6ebad88d4b94fbe (diff) |
Merge tag 'u-boot-watchdog-20250516' of https://source.denx.de/u-boot/custodians/u-boot-watchdog
CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=393&view=results
- make cyclic_(un)register idempotent
Diffstat (limited to 'doc/develop')
-rw-r--r-- | doc/develop/cyclic.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/develop/cyclic.rst b/doc/develop/cyclic.rst index 6f1da6f0d9b..a99b17052f5 100644 --- a/doc/develop/cyclic.rst +++ b/doc/develop/cyclic.rst @@ -54,3 +54,16 @@ responsible for calling all registered cyclic functions, into the common schedule() function. This guarantees that cyclic_run() is executed very often, which is necessary for the cyclic functions to get scheduled and executed at their configured periods. + +Idempotence +----------- + +Both the cyclic_register() and cyclic_unregister() functions are safe +to call on any struct cyclic_info, regardless of whether that instance +is already registered or not. + +More specifically, calling cyclic_unregister() with a cyclic_info +which is not currently registered is a no-op, while calling +cyclic_register() with a cyclic_info which is currently registered +results in it being automatically unregistered, and then registered +with the new callback function and timeout parameters. |