Bluetooth: controller: Improve ticker_by_next_slot_get

Fixes ticker_by_next_slot_get for JIT scheduler by allowing iterating
through ticker nodes without ticks_slot information, and improves
performance for legacy ticker scheduling use.

To reduce the processing and context switching overhead, a new feature
is introduced via BT_TICKER_NEXT_SLOT_GET_MATCH, by which an operation
callback may be added via the ticker_next_slot_get_ext interface, and
the match function is then called when the ticker_job is processing the
request.
By returning true in this callback, iteration stops and normal operation
callback is invoked. If the match function returns false, node iteration
continues. This reduces the number of ticker_job executions for node
iteration.

Signed-off-by: Morten Priess <mtpr@oticon.com>
This commit is contained in:
Morten Priess 2021-05-21 09:36:54 +02:00 committed by Carles Cufí
commit fa20fa95d0
5 changed files with 124 additions and 24 deletions

View file

@ -553,6 +553,15 @@ config BT_TICKER_LAZY_GET
ticker nodes, returning tick to expire and lazy count from a reference
tick.
config BT_TICKER_NEXT_SLOT_GET_MATCH
bool "Ticker Next Slot Get with match callback"
default y if BT_TICKER_SLOT_AGNOSTIC
help
This option enables ticker interface to iterate through active
ticker nodes with a callback for every found ticker node. When
returning true in the callback, iteration will stop and the normal
operation callback invoked.
config BT_TICKER_EXT
bool "Ticker extensions"
depends on !BT_TICKER_LOW_LAT && !BT_TICKER_SLOT_AGNOSTIC