Zth (libzth)
Loading...
Searching...
No Matches
zth Namespace Reference

Namespaces

namespace  coro
 
namespace  fibered
 
namespace  fsm
 
namespace  impl
 
namespace  io
 
namespace  zmq
 

Classes

struct  asFuture
 Forces the fiber to have a future that outlives the fiber. More...
 
class  Backtrace
 Save a backtrace. More...
 
struct  choose_type
 
struct  choose_type< void, WhenTIsVoid >
 
struct  Config
 The configuration of Zth. More...
 
class  Context
 
struct  ContextAttr
 
struct  coro_already_completed
 Exception thrown when a coroutine has already completed. More...
 
struct  coro_invalid_state
 Exception thrown when an operation cannot be performed due to an invalid coroutine state. More...
 
class  cow_string
 Copy-on-write string. More...
 
struct  DefaultConfig
 
struct  Env
 
struct  errno_exception
 Wrapper for an errno. More...
 
class  EventRate
 Measure the rate of some event in Hz. More...
 
struct  exception
 Base exception class for Zth exceptions. More...
 
class  Fiber
 The fiber. More...
 
struct  fiber_already_dead
 Exception thrown when an operation cannot be performed, as the fiber is already dead. More...
 
struct  fiber_future
 The future returned by a fiber. More...
 
struct  fiber_type
 
struct  FiberManipulator
 
struct  function_type_helper
 
struct  function_type_helper< R(&)(Args...)>
 
struct  function_type_helper< R(*&)(Args...)>
 
struct  function_type_helper< R(*)(Args...)>
 
struct  function_type_helper< R(Args...)>
 
struct  functor_operator_type
 
struct  functor_operator_type< R(Args...)>
 
struct  functor_traits
 
struct  functor_traits< R(&)(Args...)>
 
struct  functor_traits< R(*&)(Args...)>
 
struct  functor_traits< R(*)(Args...)>
 
struct  functor_traits< R(Args...)>
 
class  Future
 Fiber-aware future. More...
 
class  Future< void >
 
class  Gate
 Fiber-aware barrier/gate. More...
 
struct  has_call_operator
 
class  Hook
 
class  Hookable
 
struct  is_callable
 
struct  is_function
 
class  joiner
 RAII class to join fibers and futures on destruction. More...
 
class  List
 
struct  list_type
 std::list type using Config::Allocator::type. More...
 
class  Listable
 
class  Load
 Measure the load of some activity. More...
 
class  Locked
 Mutex RAII, that locks and unlocks the mutex automatically. More...
 
class  Mailbox
 Fiber-aware mailbox. More...
 
struct  map_type
 std::map type using Config::Allocator::type. More...
 
struct  monotonic_clock
 
class  Mutex
 Fiber-aware mutex. More...
 
class  NamedUniqueID
 
class  NamedUniqueID< false >
 
struct  not_in_fiber
 Exception thrown when an operation cannot be performed as there is no fiber context. More...
 
class  Optional
 
class  Optional< void >
 
struct  passOnExit
 Makes the fiber pass the given gate upon exit. More...
 
struct  PerfEvent
 An event to be processed by perf_event(). More...
 
struct  PerfEvent< false >
 
class  PerfFiber
 
class  PeriodicWakeUp
 Periodic wakeup after fixed interval. More...
 
struct  Pollable
 A pollable thing. More...
 
struct  PollableFd
 A pollable file descriptor. More...
 
class  PolledMemberWaiting
 
struct  PolledMemberWaitingHelper
 
class  PolledWaiting
 
class  PollerClient
 The poller to be used by a fiber. More...
 
class  PollerClientBase
 The abstract base class of a Poller client. More...
 
class  PollerInterface
 Abstract base class of a poller. More...
 
class  PollerServer
 Poller to be executed by the Waiter. More...
 
class  PollerServerBase
 Abstract base class of a Poller server. More...
 
class  RefCounted
 
struct  Register
 Helper class to read/write (bitfields in) hardware registers. More...
 
struct  remove_function_cvref
 
class  Runnable
 An abstract class, that can be started as a fiber. More...
 
class  safe_ptr
 Wrapper for a pointer, which checks validity of the pointer upon dereference. More...
 
class  Semaphore
 Fiber-aware semaphore. More...
 
struct  Sequence
 
struct  setName
 Change the name of a fiber returned by zth_async. More...
 
struct  setStackSize
 Change the stack size of a fiber returned by zth_async. More...
 
class  SharedPointer
 
class  SharedPointerOps
 
class  SharedPointerOps< Impl, void >
 
class  SharedReference
 
class  SharedReferenceOps
 
class  SharedReferenceOps< Impl, void >
 
class  Signal
 Fiber-aware signal. More...
 
class  Singleton
 Singleton pattern. More...
 
class  small_vector
 A simple std::vector, which can contain Prealloc without heap allocation. More...
 
struct  smallest_uint< x, smallest_uint_size< 1 > >
 
struct  smallest_uint< x, smallest_uint_size< 2 > >
 
struct  smallest_uint< x, smallest_uint_size< 4 > >
 
struct  smallest_uint_size
 
class  SortedList
 
struct  Stack
 Stack information. More...
 
class  Synchronizer
 
class  SynchronizerBase
 
class  ThreadLocalSingleton
 Singleton pattern, but only per-thread. More...
 
class  TimedWaitable
 
class  TimeInterval
 Convenient wrapper around struct timespec that contains a time interval. More...
 
class  Timestamp
 Convenient wrapper around struct timespec that contains an absolute timestamp. More...
 
struct  type
 
class  TypedFiber
 Typed fiber class. More...
 
class  TypedFiberFactory
 
class  TypedFiberN
 Actual fiber implementation for arbitrary function types and arguments. More...
 
class  TypedFiberN< F, void, Args >
 
struct  TypedFiberType
 
class  UniqueID
 Keeps track of a process-wide unique ID within the type T. More...
 
class  UniqueIDBase
 
struct  vector_type
 std::vector type using Config::Allocator::type. More...
 
class  Waitable
 
class  Waiter
 A single fiber per Worker that manages sleeping and blocked fibers. More...
 
class  Worker
 The class that manages the fibers within this thread. More...
 
class  ZmqPoller
 A PollerServer that uses zmq_poll(). More...
 

Typedefs

template<typename T >
using promise = ::std::promise< zth::type< T > >
 
template<typename T >
using future = ::std::future< zth::type< T > >
 
template<typename T >
using shared_future = ::std::shared_future< zth::type< T > >
 
typedef vector_type< PerfEvent<> >::type perf_eventBuffer_type
 
typedef ZmqPoller DefaultPollerServer
 
typedef PollerClient Poller
 The default Poller to use.
 
typedef std::basic_string< char, std::char_traits< char >, Config::Allocator< char >::type > string
 std::string type using Config::Allocator::type.
 

Enumerations

enum class  launch { launch::detached = 1 , launch::awaitable = 2 }
 Launch policies for std::async to start fibers instead of threads. More...
 

Functions

template<typename T >
 ZTH_MALLOC_ATTR ((malloc((void(*)(T *, size_t) noexcept) deallocate, 1), alloc_size(1))) static ZTH_MALLOC_INLINE T *allocate(size_t n
 Wrapper for Config::Allocator::type::allocate().
 
Arg ZTH_MALLOC_ATTR ((malloc((void(*)(T *) noexcept) delete_alloc))) static ZTH_MALLOC_INLINE T *new _alloc(Arg const &arg)
 
template<typename T , typename... Arg>
 ZTH_MALLOC_ATTR ((malloc((void(*)(T *) noexcept) delete_alloc))) static ZTH_MALLOC_INLINE T *new _alloc(Arg &&... arg)
 
template<typename Traits , typename Allocator >
string to_zth_string (std::basic_string< char, Traits, Allocator > const &s)
 
std::string to_std_string (string const &s)
 
template<typename R >
TypedFiber< R > & operator<< (TypedFiber< R > &fiber, setStackSize const &m)
 
template<typename R >
TypedFiber< R > & operator<< (TypedFiber< R > &fiber, setName const &m)
 
template<typename R >
TypedFiber< R > & operator<< (TypedFiber< R > &fiber, setName &&m)
 
template<typename R >
TypedFiber< R > & operator<< (TypedFiber< R > &fiber, passOnExit const &m)
 
template<typename R >
SharedReference< typename TypedFiber< R >::Future_type > operator<< (TypedFiber< R > &fiber, asFuture const &)
 
template<typename F >
fiber_type< F >::factory factory (F &&f, char const *name=nullptr)
 Create a new fiber.
 
template<typename F >
fiber_type< F >::factory factory (F const &f, char const *name=nullptr)
 
template<typename F , typename... Args>
fiber_type< F >::fiber fiber (F &&f, Args &&... args)
 Create and start a new fiber.
 
template<typename F >
 fiber_future (F &) -> fiber_future< typename F::factory::Return >
 
template<typename F >
 fiber_future (F const &) -> fiber_future< typename F::factory::Return >
 
bool config (int env, bool whenUnset)
 Checks if a given environment option is set.
 
int context_init () noexcept
 One-time context mechanism initialization.
 
void context_deinit () noexcept
 Final cleanup.
 
int context_create (Context *&context, ContextAttr const &attr) noexcept
 Create a context.
 
void context_switch (Context *from, Context *to) noexcept
 Perform context switch.
 
void context_destroy (Context *context) noexcept
 Destroy and cleanup a context.
 
size_t context_stack_usage (Context *context) noexcept
 Return the high water mark of the stack of the given context.
 
void stack_watermark_init (void *stack, size_t size) noexcept
 Initialize the memory region for stack high water marking.
 
size_t stack_watermark_size (void *stack) noexcept
 Return the size of the given stack region.
 
size_t stack_watermark_maxused (void *stack) noexcept
 Return the high water mark of the stack.
 
size_t stack_watermark_remaining (void *stack) noexcept
 Return the remaining stack size that was never touched.
 
template<typename R , typename... A, typename... A_>
std::enable_if<!std::is_void< R >::value, R >::type stack_switch (void *stack, size_t size, R(*f)(A...) noexcept, A_ &&... a) noexcept
 Call the function f using the new stack pointer.
 
template<typename... A, typename... A_>
void stack_switch (void *stack, size_t size, void(*f)(A...) noexcept, A_ &&... a) noexcept
 Call the function f using the new stack pointer.
 
FibercurrentFiber () noexcept
 Return the currently executing fiber.
 
void * fls () noexcept
 Return the fiber-local storage, as set by setFls().
 
void setFls (void *data=nullptr) noexcept
 Set the fiber-local storage.
 
template<typename Func , typename... Args>
zth::future< zth::impl::invoke_result< Func, Args... > > async (Func &&f, Args &&... args)
 
template<typename Func , typename... Args>
zth::future< zth::impl::invoke_result< Func, Args... > > async (zth::launch policy, Func &&f, Args &&... args)
 
int perf_init ()
 
void perf_deinit ()
 
UniqueID< Fiber > const & currentFiberID () noexcept
 
void perf_flushEventBuffer () noexcept
 
template<typename... Args>
void perf_event (Args &&... args) noexcept
 
void perf_mark (char const *marker)
 Put a string marker into the perf output.
 
void perf_log (char const *fmt,...)
 Put a formatted log string into the perf output.
 
void perf_logv (char const *fmt, va_list args)
 Put a formatted log string into the perf output.
 
void perf_syscall (char const *syscall, Timestamp const &t=Timestamp())
 Put a syscall into the perf output.
 
template<typename P >
int poll (P pollable, int timeout_ms=-1)
 Fiber-aware poll() for a single pollable thing.
 
template<>
cow_string str< TimeInterval const & > (TimeInterval const &value)
 
constexpr TimeInterval operator""_s (unsigned long long int x) noexcept
 Define literals like 123_s, which is a zth::TimeInterval of 123 seconds.
 
constexpr TimeInterval operator""_ms (unsigned long long int x) noexcept
 Define literals like 123_ms, which is a zth::TimeInterval of 123 milliseconds.
 
constexpr TimeInterval operator""_us (unsigned long long int x) noexcept
 Define literals like 123_us, which is a zth::TimeInterval of 123 microseconds.
 
TimeInterval operator""_s (long double x)
 Define literals like 12.3_s, which is a zth::TimeInterval of 12.3 seconds.
 
char const * banner () noexcept
 Prints a banner line with version and configuration information.
 
void abort (char const *fmt,...) noexcept
 Aborts the process after printing the given printf() formatted message.
 
void abortv (char const *fmt, va_list args) noexcept
 Aborts the process after printing the given printf() formatted message.
 
void assert_handler (char const *file, int line, char const *expr)
 
bool log_supports_ansi_colors () noexcept
 Returns if the system supports ANSI colors.
 
void log_colorv (int color, char const *fmt, va_list args)
 Logs a given printf()-like formatted string using an ANSI color code.
 
void log_color (int color, char const *fmt,...)
 Logs a given printf()-like formatted string using an ANSI color code.
 
void logv (char const *fmt, va_list arg)
 Logs a given printf()-like formatted string.
 
void log (char const *fmt,...)
 Logs a given printf()-like formatted string.
 
string formatv (char const *fmt, va_list args)
 Format like vsprintf(), but save the result in an zth::string.
 
string format (char const *fmt,...)
 Format like sprintf(), but save the result in an zth::string.
 
template<typename T >
cow_string str (T value)
 Returns an zth::string representation of the given value.
 
template<>
cow_string str< char > (char value)
 
template<>
cow_string str< signed char > (signed char value)
 
template<>
cow_string str< unsigned char > (unsigned char value)
 
template<>
cow_string str< short > (short value)
 
template<>
cow_string str< unsigned short > (unsigned short value)
 
template<>
cow_string str< int > (int value)
 
template<>
cow_string str< unsigned int > (unsigned int value)
 
template<>
cow_string str< long > (long value)
 
template<>
cow_string str< unsigned long > (unsigned long value)
 
template<>
cow_string str< long long > (long long value)
 
template<>
cow_string str< unsigned long long > (unsigned long long value)
 
template<>
cow_string str< float > (float value)
 
template<>
cow_string str< double > (double value)
 
template<>
cow_string str< long double > (long double value)
 
template<>
cow_string str< void * > (void *value)
 
template<>
cow_string str< string && > (string &&value)
 
string err (int e)
 Return a string like strerror() does, but as a zth::string.
 
template<>
cow_string str< UniqueIDBase const & > (UniqueIDBase const &value)
 
template<class T >
auto to_tuple (T &&object) noexcept
 
constexpr char const * version () noexcept
 Returns the version of Zth.
 
void waitUntil (TimedWaitable &w)
 Wait until the given Waitable has passed.
 
template<typename F , typename std::enable_if<!std::is_base_of< TimedWaitable, F >::value, int >::type = 0>
void waitUntil (F f, TimeInterval const &pollInterval=TimeInterval())
 Wait until the given function f returns true.
 
template<typename C >
void waitUntil (C &that, bool(C::*f)(), TimeInterval const &pollInterval=TimeInterval())
 Wait until the given member function f returns true.
 
void scheduleTask (TimedWaitable &w)
 
void unscheduleTask (TimedWaitable &w)
 
void wakeup (TimedWaitable &w)
 
void nap (Timestamp const &sleepUntil)
 Sleep until the given time stamp.
 
void nap (TimeInterval const &sleepFor)
 Sleep for the given time interval.
 
void mnap (long sleepFor_ms)
 Sleep for the given amount of milliseconds.
 
void unap (long sleepFor_us)
 Sleep for the given amount of microseconds.
 
void sigchld_check ()
 
WorkercurrentWorker () noexcept
 Return the (thread-local) singleton Worker instance.
 
void getContext (Worker **worker, Fiber **fiber) noexcept
 
void yield (Fiber *preferFiber=nullptr, bool alwaysYield=false, Timestamp const &now=Timestamp::now())
 Allow a context switch.
 
void outOfWork ()
 Force a context switch.
 
void suspend ()
 
void resume (Fiber &fiber)
 
int startWorkerThread (void(*f)(), size_t stack, char const *name)
 Start a new thread, create a Worker, with one fiber, which executes f.
 
int execlp (char const *file, char const *arg,...)
 Start an external program.
 
int execvp (char const *file, char *const arg[])
 Start an external program.
 
void context_entry (Context *context)
 
void worker_global_init ()
 

Variables

perf_eventBuffer_typeperf_eventBuffer = nullptr
 
Timestamp const startTime
 

Typedef Documentation

◆ DefaultPollerServer

Definition at line 667 of file poller.h.

◆ future

template<typename T >
using zth::future = typedef ::std::future<zth::type<T> >

Definition at line 40 of file future.h.

◆ perf_eventBuffer_type

Definition at line 257 of file perf.h.

◆ promise

template<typename T >
using zth::promise = typedef ::std::promise<zth::type<T> >

Definition at line 37 of file future.h.

◆ shared_future

template<typename T >
using zth::shared_future = typedef ::std::shared_future<zth::type<T> >

Definition at line 43 of file future.h.

Function Documentation

◆ assert_handler()

void zth::assert_handler ( char const *  file,
int  line,
char const *  expr 
)

Definition at line 16 of file assert.cpp.

◆ async() [1/2]

template<typename Func , typename... Args>
zth::future< zth::impl::invoke_result< Func, Args... > > zth::async ( Func &&  f,
Args &&...  args 
)

Definition at line 505 of file future.h.

◆ async() [2/2]

template<typename Func , typename... Args>
zth::future< zth::impl::invoke_result< Func, Args... > > zth::async ( zth::launch  policy,
Func &&  f,
Args &&...  args 
)

Definition at line 512 of file future.h.

◆ config()

bool zth::config ( int  env,
bool  whenUnset 
)

Checks if a given environment option is set.

Parameters
envone of zth::Env
whenUnsetwhen env does not exist in the environment, return this value

Definition at line 39 of file config.cpp.

◆ context_create()

int zth::context_create ( Context *&  context,
ContextAttr const &  attr 
)
noexcept

Create a context.

Normally, let zth::Fiber manage the context.

Parameters
contextthe variable that will receive the newly created context, when successful
attrthe attributes used to create the context
Returns
0 on success, otherwise an errno
Examples
measure.cpp.

Definition at line 55 of file context.cpp.

◆ context_deinit()

void zth::context_deinit ( )
noexcept

Final cleanup.

Normally, let zth::Worker call this function.

Definition at line 40 of file context.cpp.

◆ context_destroy()

void zth::context_destroy ( Context context)
noexcept

Destroy and cleanup a context.

Normally, let zth::Fiber manage the context.

Examples
measure.cpp.

Definition at line 95 of file context.cpp.

◆ context_entry()

void zth::context_entry ( Context context)

◆ context_init()

int zth::context_init ( )
noexcept

One-time context mechanism initialization.

Normally, let zth::Worker call this function.

Definition at line 29 of file context.cpp.

◆ context_stack_usage()

size_t zth::context_stack_usage ( Context context)
noexcept

Return the high water mark of the stack of the given context.

This does not take any zth::stack_switch() calls into account.

Definition at line 128 of file context.cpp.

◆ context_switch()

void zth::context_switch ( Context from,
Context to 
)
noexcept

Perform context switch.

Normally, let zth::Fiber call this function, after scheduled by the zth::Worker.

Examples
measure.cpp.

Definition at line 112 of file context.cpp.

◆ currentFiberID()

UniqueID< Fiber > const & zth::currentFiberID ( )
inlinenoexcept

Definition at line 426 of file worker.h.

◆ err()

string zth::err ( int  e)
inline

Return a string like strerror() does, but as a zth::string.

Examples
measure.cpp, and zmq.cpp.

Definition at line 686 of file util.h.

◆ factory()

template<typename F >
fiber_type< F >::factory zth::factory ( F const &  f,
char const *  name = nullptr 
)

Definition at line 1137 of file async.h.

◆ fiber_future() [1/2]

template<typename F >
zth::fiber_future ( F &  ) -> fiber_future< typename F::factory::Return >

◆ fiber_future() [2/2]

template<typename F >
zth::fiber_future ( F const &  ) -> fiber_future< typename F::factory::Return >

◆ format()

string zth::format ( char const *  fmt,
  ... 
)
inline

Format like sprintf(), but save the result in an zth::string.

Examples
4_sync.cpp, 5_perf.cpp, and measure.cpp.

Definition at line 483 of file util.h.

◆ formatv()

string zth::formatv ( char const *  fmt,
va_list  args 
)

Format like vsprintf(), but save the result in an zth::string.

Definition at line 254 of file util.cpp.

◆ getContext()

void zth::getContext ( Worker **  worker,
Fiber **  fiber 
)
inlinenoexcept

Definition at line 431 of file worker.h.

◆ log_supports_ansi_colors()

bool zth::log_supports_ansi_colors ( )
noexcept

Returns if the system supports ANSI colors.

Definition at line 194 of file util.cpp.

◆ operator<<() [1/5]

template<typename R >
SharedReference< typename TypedFiber< R >::Future_type > zth::operator<< ( TypedFiber< R > &  fiber,
asFuture const &   
)

Definition at line 280 of file async.h.

◆ operator<<() [2/5]

template<typename R >
TypedFiber< R > & zth::operator<< ( TypedFiber< R > &  fiber,
passOnExit const &  m 
)

Definition at line 280 of file async.h.

◆ operator<<() [3/5]

template<typename R >
TypedFiber< R > & zth::operator<< ( TypedFiber< R > &  fiber,
setName &&  m 
)

Definition at line 1619 of file async.h.

◆ operator<<() [4/5]

template<typename R >
TypedFiber< R > & zth::operator<< ( TypedFiber< R > &  fiber,
setName const &  m 
)

Definition at line 1619 of file async.h.

◆ operator<<() [5/5]

template<typename R >
TypedFiber< R > & zth::operator<< ( TypedFiber< R > &  fiber,
setStackSize const &  m 
)

Definition at line 1619 of file async.h.

◆ perf_deinit()

void zth::perf_deinit ( )

Definition at line 492 of file perf.cpp.

◆ perf_event()

template<typename... Args>
void zth::perf_event ( Args &&...  args)
inlinenoexcept

Definition at line 274 of file perf.h.

◆ perf_flushEventBuffer()

void zth::perf_flushEventBuffer ( )
noexcept

Definition at line 505 of file perf.cpp.

◆ perf_init()

int zth::perf_init ( )

Definition at line 478 of file perf.cpp.

◆ perf_syscall()

void zth::perf_syscall ( char const *  syscall,
Timestamp const &  t = Timestamp() 
)
inline

Put a syscall into the perf output.

Definition at line 361 of file perf.h.

◆ resume()

void zth::resume ( Fiber fiber)
inline

Definition at line 489 of file worker.h.

◆ scheduleTask()

void zth::scheduleTask ( TimedWaitable w)

Definition at line 54 of file waiter.cpp.

◆ sigchld_check()

void zth::sigchld_check ( )

Definition at line 189 of file worker.cpp.

◆ str()

template<typename T >
cow_string zth::str ( value)
inline

Returns an zth::string representation of the given value.

Specialize for your own types.

Examples
socks.cpp.

Definition at line 497 of file util.h.

◆ str< char >()

template<>
cow_string zth::str< char > ( char  value)
inline

Definition at line 503 of file util.h.

◆ str< double >()

template<>
cow_string zth::str< double > ( double  value)
inline

Definition at line 652 of file util.h.

◆ str< float >()

template<>
cow_string zth::str< float > ( float  value)
inline

Definition at line 643 of file util.h.

◆ str< int >()

template<>
cow_string zth::str< int > ( int  value)
inline

Definition at line 545 of file util.h.

◆ str< long >()

template<>
cow_string zth::str< long > ( long  value)
inline

Definition at line 573 of file util.h.

◆ str< long double >()

template<>
cow_string zth::str< long double > ( long double  value)
inline

Definition at line 661 of file util.h.

◆ str< long long >()

template<>
cow_string zth::str< long long > ( long long  value)
inline

Definition at line 602 of file util.h.

◆ str< short >()

template<>
cow_string zth::str< short > ( short  value)
inline

Definition at line 527 of file util.h.

◆ str< signed char >()

template<>
cow_string zth::str< signed char > ( signed char  value)
inline

Definition at line 509 of file util.h.

◆ str< string && >()

template<>
cow_string zth::str< string && > ( string &&  value)
inline

Definition at line 677 of file util.h.

◆ str< TimeInterval const & >()

template<>
cow_string zth::str< TimeInterval const & > ( TimeInterval const &  value)
inline

Definition at line 489 of file time.h.

◆ str< UniqueIDBase const & >()

template<>
cow_string zth::str< UniqueIDBase const & > ( UniqueIDBase const &  value)
inline

Definition at line 716 of file util.h.

◆ str< unsigned char >()

template<>
cow_string zth::str< unsigned char > ( unsigned char  value)
inline

Definition at line 518 of file util.h.

◆ str< unsigned int >()

template<>
cow_string zth::str< unsigned int > ( unsigned int  value)
inline

Definition at line 551 of file util.h.

◆ str< unsigned long >()

template<>
cow_string zth::str< unsigned long > ( unsigned long  value)
inline

Definition at line 588 of file util.h.

◆ str< unsigned long long >()

template<>
cow_string zth::str< unsigned long long > ( unsigned long long  value)
inline

Definition at line 616 of file util.h.

◆ str< unsigned short >()

template<>
cow_string zth::str< unsigned short > ( unsigned short  value)
inline

Definition at line 536 of file util.h.

◆ str< void * >()

template<>
cow_string zth::str< void * > ( void *  value)
inline

Definition at line 670 of file util.h.

◆ suspend()

void zth::suspend ( )
inline

Definition at line 481 of file worker.h.

◆ to_std_string()

std::string zth::to_std_string ( string const &  s)
inline

Definition at line 223 of file allocator.h.

◆ to_tuple()

template<class T >
auto zth::to_tuple ( T &&  object)
noexcept

Definition at line 1601 of file util.h.

◆ to_zth_string()

template<typename Traits , typename Allocator >
string zth::to_zth_string ( std::basic_string< char, Traits, Allocator > const &  s)

Definition at line 218 of file allocator.h.

◆ unscheduleTask()

void zth::unscheduleTask ( TimedWaitable w)

Definition at line 66 of file waiter.cpp.

◆ wakeup()

void zth::wakeup ( TimedWaitable w)

Definition at line 77 of file waiter.cpp.

◆ worker_global_init()

void zth::worker_global_init ( )

Definition at line 31 of file worker.cpp.

◆ ZTH_MALLOC_ATTR() [1/2]

template<typename T , typename... Arg>
zth::ZTH_MALLOC_ATTR ( (malloc((void(*)(T *) noexcept) delete_alloc))  ) &&
new

Definition at line 132 of file allocator.h.

◆ ZTH_MALLOC_ATTR() [2/2]

Arg zth::ZTH_MALLOC_ATTR ( (malloc((void(*)(T *) noexcept) delete_alloc))  ) const &
new

Definition at line 115 of file allocator.h.

Variable Documentation

◆ perf_eventBuffer

perf_eventBuffer_type * zth::perf_eventBuffer = nullptr

Definition at line 48 of file perf.cpp.

◆ startTime

Timestamp const zth::startTime
extern

Definition at line 205 of file time.cpp.