zephyr/doc
Nicolas Pitre 52e2f83185 kernel/timeout: introduce the timepoint API
This is meant as a substitute for sys_clock_timeout_end_calc()

Current sys_clock_timeout_end_calc() usage opens up many bug
possibilities due to the actual timeout evaluation's open-coded nature.

Issue ##50611 is one example.

- Some users store the returned value in a signed variable, others in
  an unsigned one, making the comparison with UINT64_MAX (corresponding
  to K_FOREVER) wrong in the signed case.

- Some users compute the difference and store that in a signed variable
  to compare against 0 which still doesn't work with K_FOREVER. And when
  this difference is used as a timeout argument then the K_FOREVER
  nature of the timeout is lost.

- Some users complexify their code by special-casing K_NO_WAIT and
  K_FOREVER inline which is bad for both code readability and binary
  size.

Let's introduce a better abstraction to deal with absolute timepoints
with an opaque type to be used with a well-defined API.
The word "timeout" was avoided in the naming on purpose as the timeout
namespace is quite crowded already and it is preferable to make a
distinction between relative time periods (timeouts) and absolute time
values (timepoints).

A few stacks are also adjusted as they were too tight on X86.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-07-25 09:12:26 +02:00
..
_doxygen drivers: mfd: npm1300: Initial version 2023-06-19 11:02:58 +02:00
_extensions/zephyr doc: Log unused log filter patterns 2023-07-03 10:05:52 +00:00
_scripts doc: Add old toolchain pages to redirects 2023-04-04 10:53:02 -07:00
_static doc: Update requirements-doc.txt to use docleaf 2023-07-03 10:05:52 +00:00
_templates
build device: s/gen_handles/gen_device_deps 2023-06-21 09:32:05 +02:00
connectivity doc: net: Add Wi-Fi management 2023-07-14 15:02:29 +02:00
contribute doc: move requirements to doc/ 2023-07-12 09:13:49 -04:00
develop west: runner: add support for NXP's linkserver 2023-07-21 14:57:25 -05:00
hardware serial: allow callback setting to be exclusive 2023-07-18 11:13:02 +00:00
images
introduction doc: introduction: Improve style and grammar across the chapter 2023-07-10 10:01:08 +00:00
kernel kernel/timeout: introduce the timepoint API 2023-07-25 09:12:26 +02:00
project templates: change template file namaes for proper sorting 2023-06-08 07:32:45 -04:00
releases doc: releases: Add release notes for NuMaker M46x 2023-07-24 08:27:21 +00:00
safety docs: safety: Add safety documentation 2023-06-22 06:01:39 -04:00
security doc: vulnerabilities: Add information about new vulnerabilities 2023-06-15 13:55:07 -04:00
services docs: RTIO documentation updates 2023-07-20 12:00:50 -04:00
templates
404.rst
CMakeLists.txt doc: enable Sphinx tracebacks 2023-07-12 09:13:49 -04:00
conf.py doc: Drop Zephyr 2.2 from supported releases 2023-07-14 09:30:48 -04:00
glossary.rst
index-tex.rst docs: safety: Add safety documentation 2023-06-22 06:01:39 -04:00
index.rst docs: safety: Add safety documentation 2023-06-22 06:01:39 -04:00
kconfig.rst
known-warnings.txt doc: Remove sphinx warning bt_ots_init pattern 2023-07-12 11:48:42 +02:00
LICENSING.rst doc licensing: Remove get_maintainers.pl 2023-06-25 02:46:42 -04:00
Makefile doc: align pseudo-Makefile with latest CMake changes 2023-07-13 14:27:56 +02:00
requirements.txt doc: requirements: update Sphinx and rtd theme 2023-07-12 19:59:03 -04:00
substitutions.txt
zephyr.doxyfile.in doc: doxygen: Enable Doxygen autobrief 2023-07-13 09:20:51 +02:00