Contains thread-state helper macros. More...
On top of the set of state helper macros, picotm provides thread-state helper macros. These macros provide a single per-thread instance of a state variable.
Thread-local state requires the definition of a regular state variable.
PICOTM_THREAD_STATE_STATIC_IMPL()
defines the thread-local state for the state variable.
The macros PICOTM_THREAD_STATE_ACQUIRE()
and PICOTM_THREAD_STATE_RELEASE()
acquire and release the state variable in the same way as their state counterparts. The difference is that there's only one instance of the state variable for each thread.