mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-21 06:12:09 +00:00
f7e38b3ec3
Adds initial ThreadX support through a set of backends for pw_sync through pw_sync_threadx and pw_chrono through pw_chrono_threadx. Change-Id: I3e310323cfce3d4bf07557273c2a86f91f6479d7 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/24900 Reviewed-by: Wyatt Hepler <hepler@google.com> Commit-Queue: Ewout van Bekkum <ewout@google.com>
35 lines
1.2 KiB
ReStructuredText
35 lines
1.2 KiB
ReStructuredText
.. _module-pw_chrono_threadx:
|
|
|
|
-=---------------
|
|
pw_chrono_threadx
|
|
-----------------
|
|
``pw_chrono_threadx`` is a collection of ``pw_chrono`` backends that are
|
|
implemented using ThreadX.
|
|
|
|
.. warning::
|
|
This module is under construction, not ready for use, and the documentation
|
|
is incomplete.
|
|
|
|
SystemClock backend
|
|
-------------------
|
|
The ThreadX based ``system_clock`` backend implements the
|
|
``pw_chrono:system_clock`` facade by using ``tx_time_get()``. Before the global
|
|
singleton SystemClock's SpinLock is constructed the raw result is returned,
|
|
after the overflows are managed in a thread and IRQ safe manner to produce a
|
|
signed 64 bit timestamp.
|
|
|
|
The ``SystemClock::now()`` must be used more than once per overflow of the
|
|
native ThreadX ``tx_time_get()`` overflow. Note that this duration may vary if
|
|
``tx_time_set()`` is used.
|
|
|
|
.. warning::
|
|
Note that this is not compatible with TX_NO_TIMER as this disables
|
|
``tx_time_get()``.
|
|
|
|
Build targets
|
|
-------------
|
|
The GN build for ``pw_chrono_threadx`` has one target: ``system_clock``.
|
|
The ``system_clock`` target provides the
|
|
``pw_chrono_backend/system_clock_config.h`` and ``pw_chrono_threadx/config.h``
|
|
headers and the backend for the ``pw_chrono:system_clock``.
|