-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Closed
Copy link
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: Kernelpriority: lowLow impact/importance bugLow impact/importance bug
Description
Reported by Allan Stephens:
Currently the kernel maintains a linked list of active timeouts, with each timeout recording the number of additional ticks it must wait after the preceding timeout expires. It may be more efficient for a timeout to record the absolute tick count when it expires, rather than a delta.
Potential benefits:
- k_timer_remaining_get() would no longer need to walk the list to compute how much time is left until a timer expires -- it could just subtract the current tick count from the deadline tick count.
- It should be slightly faster to handle the removal of a timeout that is stopped before it expires, since it wouldn't be necessary to adjust the delta time of the next timeout in the list (if one exists).
Potential costs:
- Unknown. It might be worth prototyping the change and seeing if it increases footprint significantly -- if so, the time vs. space trade-off would need to be analyzed.
(Imported from Jira ZEP-1332)
Metadata
Metadata
Assignees
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: Kernelpriority: lowLow impact/importance bugLow impact/importance bug