Zth (libzth)
|
#include <sigaltstack.h>
Public Types | |
typedef impl::ContextArch< Context > | base |
typedef ContextArch< Context > | base |
typedef impl::ContextArch< Context > | base |
typedef impl::ContextArch< Context > | base |
Public Types inherited from zth::impl::ContextArch< Context > | |
typedef ContextBase< Context > | base |
typedef ContextBase< Context > | base |
Public Member Functions | |
constexpr | Context (ContextAttr const &attr) noexcept |
int | create () noexcept |
void | context_switch (Context &to) noexcept |
constexpr | Context (ContextAttr const &attr) noexcept |
int | create () noexcept |
void | context_switch (Context &to) noexcept |
constexpr | Context (ContextAttr const &attr) noexcept |
int | create () noexcept |
void | context_switch (Context &to) noexcept |
constexpr | Context (ContextAttr const &attr) noexcept |
int | initStack (Stack &UNUSED_PAR(stack), Stack &UNUSED_PAR(usable)) noexcept |
void | deinitStack (Stack &UNUSED_PAR(stack)) noexcept |
int | stackGuardInit () noexcept |
void | stackGuardDeinit () noexcept |
void | valgrindRegister () noexcept |
void | valgrindDeregister () noexcept |
int | create () noexcept |
void | destroy () noexcept |
void | context_switch (Context &to) noexcept |
Public Member Functions inherited from zth::impl::ContextArch< Context > | |
size_t | calcStackSize (size_t size) noexcept |
void | stackAlign (Stack &stack) noexcept |
Context & | impl () noexcept |
Return Impl this . More... | |
Context const & | impl () const noexcept |
Return Impl this . More... | |
Public Member Functions inherited from zth::impl::ContextBase< Impl > | |
ContextAttr & | attr () noexcept |
Return the context attributes, requested by the user. More... | |
ContextAttr const & | attr () const noexcept |
Return the context attributes, requested by the user. More... | |
int | create () noexcept |
Create context. More... | |
void | destroy () noexcept |
Destroy and cleanup context. More... | |
int | initStack (Stack &stack, Stack &usable) noexcept |
Allocate and initialize stack. More... | |
void | deinitStack (Stack &stack) noexcept |
Deinit and free stack. More... | |
Stack const & | stack () const noexcept |
Return the stack address. More... | |
Stack const & | stackUsable () const noexcept |
Return the start of the actual usable stack. More... | |
size_t | calcStackSize (size_t size) noexcept |
Compute the stack size, given the requested user size and current configuration. More... | |
void * | allocStack (size_t size) noexcept |
Allocate requested size of stack memory. More... | |
void | deallocStack (Stack &stack) noexcept |
Frees the previously allocated stack. More... | |
void | stackAlign (Stack &stack) noexcept |
Compute and modify the stack alignment and size, within the allocated space. More... | |
void | valgrindRegister () noexcept |
Register the current stack to valgrind. More... | |
void | valgrindDeregister () noexcept |
Deregister the current stack from valgrind. More... | |
int | stackGuardInit () noexcept |
Initialize guards around the stack memory. More... | |
void | stackGuardDeinit () noexcept |
Release the guards around the memory. More... | |
void | stackGuard () noexcept |
Configure the guard for the current fiber. More... | |
void | stackGuard (Stack const &stack) noexcept |
Configure the guard for the given stack. More... | |
void * | stackGuard (void *p) noexcept |
Configure the guard for the address. More... | |
void | context_switch (Context &to) noexcept |
Perform a context switch. More... | |
void | context_push_regs () noexcept |
Pre-sjlj context saving. More... | |
void | context_pop_regs () noexcept |
Post-sjlj context restoring. More... | |
void | context_prepare_jmp (Impl &to, jmp_buf &env) noexcept |
Pre-sjlj jump. More... | |
void | die () noexcept |
Flag fiber as died after it returned from context_entry() . More... | |
bool | alive () const noexcept |
Check if fiber is still running. More... | |
void * | stack_switch (void *stack, size_t size, void *(*f)(void *) noexcept, void *arg) noexcept |
Static Public Member Functions | |
static int | init () noexcept |
static void | deinit () noexcept |
static int | init () noexcept |
Static Public Member Functions inherited from zth::impl::ContextArch< Context > | |
static size_t | pageSize () noexcept |
static void * | sp () noexcept |
Static Public Member Functions inherited from zth::impl::ContextBase< Impl > | |
static int | init () noexcept |
One-time system initialization. More... | |
static void | deinit () noexcept |
Final system cleanup. More... | |
static size_t | pageSize () noexcept |
Get system's page size. More... | |
static bool | stackGrowsDown (void const *reference) |
Checks if the stack grows down or up. More... | |
static void ** | sp (Stack const &stack) noexcept |
Get the initial stack pointer for the given stack. More... | |
static void | stack_push (void **&sp, void *p) noexcept |
Push data into the stack. More... | |
static void | set_sp (jmp_buf &env, void **sp) noexcept |
Set the stack pointer in a jmp_buf . More... | |
static void | set_pc (jmp_buf &env, void *sp) noexcept |
Set the program counter in a jmp_buf . More... | |
static void | context_trampoline_from_jmp_buf () |
Entry point to jump to from a (sig)jmp_buf. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from zth::impl::ContextArch< Context > | |
constexpr | ContextArch (ContextAttr const &attr) noexcept |
constexpr | ContextArch (ContextAttr const &attr) noexcept |
Protected Member Functions inherited from zth::impl::ContextBase< Impl > | |
constexpr | ContextBase (ContextAttr const &attr) noexcept |
~ContextBase () | |
Dtor. More... | |
Impl & | impl () noexcept |
Return Impl this . More... | |
Impl const & | impl () const noexcept |
Return Impl this . More... | |
Definition at line 60 of file sigaltstack.h.
typedef impl::ContextArch<Context> zth::Context::base |
Definition at line 63 of file sigaltstack.h.
typedef ContextArch<Context> zth::Context::base |
typedef impl::ContextArch<Context> zth::Context::base |
Definition at line 37 of file ucontext.h.
typedef impl::ContextArch<Context> zth::Context::base |
Definition at line 25 of file winfiber.h.
|
inlineexplicitconstexprnoexcept |
Definition at line 65 of file sigaltstack.h.
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
Definition at line 39 of file ucontext.h.
|
inlineexplicitconstexprnoexcept |
Definition at line 27 of file winfiber.h.
|
inlinenoexcept |
Definition at line 291 of file sigaltstack.h.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 115 of file ucontext.h.
|
inlinenoexcept |
Definition at line 106 of file winfiber.h.
|
inlinenoexcept |
Definition at line 151 of file sigaltstack.h.
|
inlinenoexcept |
Definition at line 67 of file ucontext.h.
|
inlinenoexcept |
Definition at line 67 of file winfiber.h.
|
inlinestaticnoexcept |
Definition at line 139 of file sigaltstack.h.
|
inlinenoexcept |
Definition at line 50 of file winfiber.h.
|
inlinenoexcept |
Definition at line 92 of file winfiber.h.
|
inlinestaticnoexcept |
Definition at line 119 of file sigaltstack.h.
|
inlinestaticnoexcept |
Definition at line 32 of file winfiber.h.
Definition at line 43 of file winfiber.h.
|
inlinenoexcept |
Definition at line 58 of file winfiber.h.
|
inlinenoexcept |
Definition at line 52 of file winfiber.h.
|
inlinenoexcept |
Definition at line 65 of file winfiber.h.
|
inlinenoexcept |
Definition at line 60 of file winfiber.h.
sig_atomic_t volatile zth::Context::m_did_trampoline |
Definition at line 306 of file sigaltstack.h.
sigjmp_buf zth::Context::m_env |
Definition at line 302 of file sigaltstack.h.
sigjmp_buf* volatile zth::Context::m_parent |
Definition at line 307 of file sigaltstack.h.
jmp_buf zth::Context::m_trampoline_env |
Definition at line 301 of file sigaltstack.h.