|
struct | vector_type |
| std::vector type using Config::Allocator::type. More...
|
|
struct | map_type |
| std::map type using Config::Allocator::type. More...
|
|
struct | list_type |
| std::list type using Config::Allocator::type. More...
|
|
class | TypedFiber |
|
class | FiberManipulator |
|
class | setStackSize |
| Change the stack size of a fiber returned by async. More...
|
|
class | setName |
| Change the name of a fiber returned by async. More...
|
|
class | passOnExit |
| Makes the fiber pass the given gate upon exit. More...
|
|
class | AutoFuture |
|
class | TypedFiberN |
|
class | TypedFiberN< void, Args... > |
|
struct | TypedFiberType |
|
struct | TypedFiberType< R(*)(Args...)> |
|
class | TypedFiberFactory |
|
struct | fiber_type_impl |
|
struct | fiber_type |
|
struct | fiber_type< R(*)(Args...)> |
|
struct | Env |
|
struct | DefaultConfig |
|
class | Context |
|
struct | ContextAttr |
|
class | Fiber |
| The fiber. More...
|
|
class | Runnable |
| An abstract class, that can be started as a fiber. More...
|
|
class | FsmGuard |
| A guard is evaluated, and when true, the corresponding transition is taken. More...
|
|
struct | FsmDescription |
| The description of a Fsm. More...
|
|
class | FsmCompiler |
| A compiler to turn an zth::FsmDescription into something that can be used by zth::Fsm. More...
|
|
class | Fsm |
| A Finite-state machine. More...
|
|
class | FsmCallback |
|
class | FsmCallback< State_, void, Input_, FsmImpl_ > |
|
class | List |
|
class | SortedList |
|
class | Listable |
|
class | Backtrace |
| Save a backtrace. More...
|
|
struct | PerfEvent |
| An event to be processed by perf_event(). More...
|
|
struct | PerfEvent< false > |
|
class | Load |
| Measure the load of some activity. More...
|
|
class | EventRate |
| Measure the rate of some event in Hz. More...
|
|
struct | Pollable |
| A pollable thing. More...
|
|
struct | PollableFd |
| A pollable file descriptor. More...
|
|
class | PollerInterface |
| Abstract base class of a poller. More...
|
|
class | PollerClientBase |
| The abstract base class of a Poller client. More...
|
|
class | PollerServerBase |
| Abstract base class of a Poller server. More...
|
|
class | PollerServer |
| Poller to be executed by the Waiter. More...
|
|
class | ZmqPoller |
| A PollerServer that uses zmq_poll() . More...
|
|
class | PollerClient |
| The poller to be used by a fiber. More...
|
|
struct | Register |
| Helper class to read/write (bitfields in) hardware registers. More...
|
|
class | RefCounted |
|
class | SharedPointer |
|
class | Synchronizer |
|
class | Mutex |
| Fiber-aware mutex. More...
|
|
class | Semaphore |
| Fiber-aware semaphore. More...
|
|
class | Signal |
| Fiber-aware signal. More...
|
|
class | Future |
| Fiber-aware future. More...
|
|
class | Future< void > |
|
class | Gate |
| Fiber-aware barrier/gate. More...
|
|
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...
|
|
class | cow_string |
| Copy-on-write string. More...
|
|
class | UniqueIDBase |
|
class | UniqueID |
| Keeps track of a process-wide unique ID within the type T . More...
|
|
struct | choose_type |
|
struct | choose_type< void, WhenTIsVoid > |
|
struct | Sequence |
|
class | safe_ptr |
| Wrapper for a pointer, which checks validity of the pointer upon dereference. More...
|
|
class | Singleton |
| Singleton pattern. More...
|
|
class | ThreadLocalSingleton |
| Singleton pattern, but only per-thread. More...
|
|
class | small_vector |
| A simple std::vector, which can contain Prealloc without heap allocation. More...
|
|
struct | smallest_uint_size |
|
struct | smallest_uint< x, smallest_uint_size< 1 > > |
|
struct | smallest_uint< x, smallest_uint_size< 2 > > |
|
struct | smallest_uint< x, smallest_uint_size< 4 > > |
|
class | Waitable |
|
class | TimedWaitable |
|
class | PolledWaiting |
|
struct | PolledMemberWaitingHelper |
|
class | PolledMemberWaiting |
|
class | Waiter |
| A single fiber per Worker that manages sleeping and blocked fibers. More...
|
|
class | PeriodicWakeUp |
| Periodic wakeup after fixed interval. More...
|
|
class | Worker |
| The class that manages the fibers within this thread. More...
|
|
struct | Config |
| The configuration of Zth. More...
|
|
class | PerfFiber |
|
|
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 , typename F > |
TypedFiber< R, F > & | operator<< (TypedFiber< R, F > &f, FiberManipulator const &m) |
|
template<typename F > |
fiber_type< F >::factory | fiber (F f, char const *name=nullptr) |
| Create a new fiber. More...
|
|
bool | config (int env, bool whenUnset) |
| Checks if a given environment option is set. More...
|
|
int | context_init () noexcept |
| One-time context mechanism initialization. More...
|
|
void | context_deinit () noexcept |
| Final cleanup. More...
|
|
int | context_create (Context *&context, ContextAttr const &attr) noexcept |
| Create a context. More...
|
|
void | context_switch (Context *from, Context *to) noexcept |
| Perform context switch. More...
|
|
void | context_destroy (Context *context) noexcept |
| Destroy and cleanup a context. More...
|
|
size_t | context_stack_usage (Context *context) noexcept |
| Return the high water mark of the stack of the given context. More...
|
|
void | stack_watermark_init (void *stack, size_t size) noexcept |
| Initialize the memory region for stack high water marking. More...
|
|
size_t | stack_watermark_size (void *stack) noexcept |
| Return the size of the given stack region. More...
|
|
size_t | stack_watermark_maxused (void *stack) noexcept |
| Return the high water mark of the stack. More...
|
|
size_t | stack_watermark_remaining (void *stack) noexcept |
| Return the remaining stack size that was never touched. More...
|
|
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. More...
|
|
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. More...
|
|
Fiber & | currentFiber () noexcept |
| Return the currently executing fiber. More...
|
|
void * | fls () noexcept |
| Return the fiber-local storage, as set by setFls(). More...
|
|
void | setFls (void *data=nullptr) noexcept |
| Set the fiber-local storage. More...
|
|
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. More...
|
|
void | perf_log (char const *fmt,...) |
| Put a formatted log string into the perf output. More...
|
|
void | perf_logv (char const *fmt, va_list args) |
| Put a formatted log string into the perf output. More...
|
|
void | perf_syscall (char const *syscall, Timestamp const &t=Timestamp()) |
| Put a syscall into the perf output. More...
|
|
template<typename P > |
int | poll (P pollable, int timeout_ms=-1) |
| Fiber-aware poll () for a single pollable thing. More...
|
|
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. More...
|
|
constexpr TimeInterval | operator""_ms (unsigned long long int x) noexcept |
| Define literals like 123_ms , which is a zth::TimeInterval of 123 milliseconds. More...
|
|
constexpr TimeInterval | operator""_us (unsigned long long int x) noexcept |
| Define literals like 123_us , which is a zth::TimeInterval of 123 microseconds. More...
|
|
TimeInterval | operator""_s (long double x) |
| Define literals like 12.3_s , which is a zth::TimeInterval of 12.3 seconds. More...
|
|
char const * | banner () noexcept |
| Prints a banner line with version and configuration information. More...
|
|
void | abort (char const *fmt,...) noexcept |
| Aborts the process after printing the given printf() formatted message. More...
|
|
void | abortv (char const *fmt, va_list args) noexcept |
| Aborts the process after printing the given printf() formatted message. More...
|
|
void | assert_handler (char const *file, int line, char const *expr) |
|
bool | log_supports_ansi_colors () noexcept |
| Returns if the system supports ANSI colors. More...
|
|
void | log_colorv (int color, char const *fmt, va_list args) |
| Logs a given printf()-like formatted string using an ANSI color code. More...
|
|
void | log_color (int color, char const *fmt,...) |
| Logs a given printf()-like formatted string using an ANSI color code. More...
|
|
void | logv (char const *fmt, va_list arg) |
| Logs a given printf()-like formatted string. More...
|
|
void | log (char const *fmt,...) |
| Logs a given printf()-like formatted string. More...
|
|
string | formatv (char const *fmt, va_list args) |
| Format like vsprintf() , but save the result in an zth::string . More...
|
|
string | format (char const *fmt,...) |
| Format like sprintf() , but save the result in an zth::string . More...
|
|
template<typename T > |
cow_string | str (T value) |
| Returns an zth::string representation of the given value. More...
|
|
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< string && > (string &&value) |
|
string | err (int e) |
| Return a string like strerror() does, but as a zth::string . More...
|
|
template<> |
cow_string | str< UniqueIDBase const & > (UniqueIDBase const &value) |
|
constexpr char const * | version () noexcept |
| Returns the version of Zth. More...
|
|
void | waitUntil (TimedWaitable &w) |
| Wait until the given Waitable has passed. More...
|
|
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 . More...
|
|
template<typename C > |
void | waitUntil (C &that, bool(C::*f)(), TimeInterval const &pollInterval=TimeInterval()) |
| Wait until the given member function f returns true . More...
|
|
void | scheduleTask (TimedWaitable &w) |
|
void | unscheduleTask (TimedWaitable &w) |
|
void | wakeup (TimedWaitable &w) |
|
void | nap (Timestamp const &sleepUntil) |
| Sleep until the given time stamp. More...
|
|
void | nap (TimeInterval const &sleepFor) |
| Sleep for the given time interval. More...
|
|
void | mnap (long sleepFor_ms) |
| Sleep for the given amount of milliseconds. More...
|
|
void | unap (long sleepFor_us) |
| Sleep for the given amount of microseconds. More...
|
|
void | sigchld_check () |
|
Worker & | currentWorker () noexcept |
| Return the (thread-local) singleton Worker instance. More...
|
|
void | getContext (Worker **worker, Fiber **fiber) noexcept |
|
void | yield (Fiber *preferFiber=nullptr, bool alwaysYield=false, Timestamp const &now=Timestamp::now()) |
| Allow a context switch. More...
|
|
void | outOfWork () |
| Force a context switch. More...
|
|
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 . More...
|
|
int | execlp (char const *file, char const *arg,...) |
| Start an external program. More...
|
|
int | execvp (char const *file, char *const arg[]) |
| Start an external program. More...
|
|
void | context_entry (Context *context) |
|
void | worker_global_init () |
|