Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / pw_chrono_freertos / docs.rst
1 .. _module-pw_chrono_freertos:
2
3 ------------------
4 pw_chrono_freertos
5 ------------------
6 ``pw_chrono_freertos`` is a collection of ``pw_chrono`` backends that are
7 implemented using FreeRTOS.
8
9 .. warning::
10   This module is under construction, not ready for use, and the documentation
11   is incomplete.
12
13 SystemClock backend
14 -------------------
15 The FreeRTOS based ``system_clock`` backend implements the
16 ``pw_chrono:system_clock`` facade by using ``xTaskGetTickCountFromISR()`` and
17 ``xTaskGetTickCount()`` based on the current context. Before the global
18 singleton SystemClock's SpinLock is constructed the raw result is returned,
19 after the overflows are managed in a thread and IRQ safe manner to produce a
20 signed 64 bit timestamp.
21
22 The ``SystemClock::now()`` must be used more than once per overflow of the
23 native FreeRTOS ``xTaskGetTickCount*()`` overflow. Note that this duration may
24 vary if ``portSUPPRESS_TICKS_AND_SLEEP()``, ``vTaskStepTick()``, and/or
25 ``xTaskCatchUpTicks()`` are used.
26
27 Build targets
28 -------------
29 The GN build for ``pw_chrono_freertos`` has one target: ``system_clock``.
30 The ``system_clock`` target provides the
31 ``pw_chrono_backend/system_clock_config.h`` and ``pw_chrono_freertos/config.h``
32 headers and the backend for the ``pw_chrono:system_clock``.