|
| 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...
|
| |
|
| 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.
|
| |
| Fiber & | currentFiber () 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 () |
| |
| Worker & | currentWorker () 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 () |
| |