pw_chrono_threadx#

Pigweed AI summary: The pw_chrono_threadx module is a collection of pw_chrono backends that use ThreadX, but it is still under construction and incomplete. The SystemClock backend uses tx_time_get() to implement the pw_chrono:system_clock facade, but it requires the use of InterruptSpinLock to manage overflows in a thread and interrupt safe manner. The module has one build target, system_clock, which provides headers and the backend for pw_chrono:system_clock. Note

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#

Pigweed AI summary: The SystemClock backend uses ThreadX and InterruptSpinLock to manage overflows and produce a signed 64 bit timestamp. SystemClock::now() must be used more than once per overflow of tx_time_get() and may vary if tx_time_set() is used. It is not compatible with TX_NO_TIMER as this disables tx_time_get().

The ThreadX based system_clock backend implements the pw_chrono:system_clock facade by using tx_time_get(). An InterruptSpinLock is used to manage overflows in a thread and interrupt 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#

Pigweed AI summary: The GN build for pw_chrono_threadx has only one target, which is the system_clock. This target provides headers and backend for the pw_chrono:system_clock.

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.