22 # if __cplusplus >= 201103L
36 bool config(
int env ,
bool whenUnset);
46 # define zth_config(name) (::zth::config(::zth::Env::name, ::zth::Config::name))
70 # ifdef ZTH_OS_BAREMETAL
92 # ifdef ZTH_CONFIG_ENABLE_DEBUG_PRINT
93 ZTH_CONFIG_ENABLE_DEBUG_PRINT;
104 # ifdef ZTH_OS_BAREMETAL
164 # ifdef ZTH_OS_BAREMETAL
178 # ifdef ZTH_HAVE_LIBZMQ
191 template <
typename T>
193 typedef std::allocator<T>
type;
bool config(int env, bool whenUnset)
Checks if a given environment option is set.
static int const Print_zmq
static int const Print_perf
static int const Print_context
static bool const EnablePerfEvent
Enable (but not necessarily record) perf.
static bool const DoPerfEvent
Record and output perf events.
static size_t const DefaultFiberStackSize
Default fiber stack size in bytes.
static bool const EnableDebugPrint
Actually do print the debug output.
static int const Print_waiter
static bool const Debug
This is a debug build when set to true.
static bool const EnableAssert
When true, enable zth_assert().
static int const TimesliceOverrunFactorReportThreshold
Print an overrun reported when MinTimeslice_s() is exceeded by this factor.
static int const Print_fiber
static int const Print_worker
static int const Print_banner
ANSI color used by zth_dbg(). Printing this category is disabled when set to 0.
static size_t const PerfEventBufferSize
Buffer size for perf events.
static bool const ContextSignals
Take POSIX signal into account when doing a context switch.
static bool const EnableStackWaterMark
When true, enable stack watermark to detect maximum stack usage.
static bool const EnableThreads
Add (Worker) thread support when true.
static int const Print_thread
static bool const NamedFsm
Use named FSM guards/actions.
static bool const EnableStackGuard
When true, enable stack guards.
static bool const CheckTimesliceOverrun
Check time slice overrun at every context switch.
static bool const UseZMQ
Enable ZeroMQ support.
static int const Print_list
static int const Print_io
static bool const EnableColorLog
Enable colored output.
static int const Print_sync
static size_t const PerfVCDFileBuffer
VCD file buffer in bytes.
static bool const PerfSyscall
Also record syscalls by perf.
static int const Print_fsm
static bool const SupportDebugPrint
Add support to enable debug output prints.
constexpr static double MinTimeslice_s()
Minimum time slice before zth::yield() actually yields.
static bool const EnableFullAssert
Show failing expression in case of a failed assert.
static size_t const PerfEventBufferThresholdToTriggerVCDWrite
Threshold when to force writing out VCD buffer.
static bool const NamedSynchronizer
Save names for all zth::Synchronizer instances.