YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
yaclib::fiber Namespace Reference

Functions

void SetFaultTickLength (std::uint32_t ns) noexcept
 Sets the amount of time to be added to fiber's scheduler time after each schedule cycle.
 
void SetFaultRandomListPick (std::uint32_t k) noexcept
 Sets the length of scheduler queue prefix and suffix from which the next schedule candidate will be chosen.
 
void SetStackSize (std::uint32_t pages) noexcept
 Sets fiber stack size for fault injection in pages.
 
void SetStackCacheSize (std::uint32_t c) noexcept
 Sets fiber stack cache size for fault injection.
 
void SetHardwareConcurrency (std::uint32_t c) noexcept
 Sets hardware_concurrency in fiber based execution.
 
std::uint64_t GetFaultRandomCount () noexcept
 
void ForwardToFaultRandomCount (std::uint64_t random_count) noexcept
 Forwards random count for fiber-based execution to supplied one.
 
std::uint32_t GetInjectorState () noexcept
 
void SetInjectorState (std::uint32_t state) noexcept
 Sets injector state to the supplied one.
 

Function Documentation

◆ ForwardToFaultRandomCount()

void yaclib::fiber::ForwardToFaultRandomCount ( std::uint64_t  random_count)
noexcept

Forwards random count for fiber-based execution to supplied one.

Definition at line 73 of file config.cpp.

References yaclib::detail::ForwardToRandCount(), and yaclib::MakeContract().

◆ GetFaultRandomCount()

std::uint64_t yaclib::fiber::GetFaultRandomCount ( )
noexcept
Returns
current random count for fiber-based execution

Definition at line 69 of file config.cpp.

References yaclib::detail::GetRandCount().

◆ GetInjectorState()

std::uint32_t yaclib::fiber::GetInjectorState ( )
noexcept
Returns
current injector state

Definition at line 77 of file config.cpp.

References yaclib::GetInjector(), and yaclib::detail::Injector::GetState().

◆ SetFaultRandomListPick()

void yaclib::fiber::SetFaultRandomListPick ( std::uint32_t  k)
noexcept

Sets the length of scheduler queue prefix and suffix from which the next schedule candidate will be chosen.

Default is 10.

Definition at line 45 of file config.cpp.

References yaclib::MakeContract(), and yaclib::detail::fiber::SetRandomListPick().

◆ SetFaultTickLength()

void yaclib::fiber::SetFaultTickLength ( std::uint32_t  ns)
noexcept

Sets the amount of time to be added to fiber's scheduler time after each schedule cycle.

Default is 10

Definition at line 39 of file config.cpp.

References yaclib::MakeContract(), and yaclib::fault::Scheduler::SetTickLength().

◆ SetHardwareConcurrency()

void yaclib::fiber::SetHardwareConcurrency ( std::uint32_t  c)
noexcept

Sets hardware_concurrency in fiber based execution.

Default equals to std::thread::hardware_concurrency.

Definition at line 63 of file config.cpp.

References yaclib::MakeContract(), and yaclib::detail::fiber::Thread::SetHardwareConcurrency().

◆ SetInjectorState()

void yaclib::fiber::SetInjectorState ( std::uint32_t  state)
noexcept

Sets injector state to the supplied one.

Definition at line 85 of file config.cpp.

References yaclib::GetInjector(), yaclib::MakeContract(), and yaclib::detail::Injector::SetState().

◆ SetStackCacheSize()

void yaclib::fiber::SetStackCacheSize ( std::uint32_t  c)
noexcept

Sets fiber stack cache size for fault injection.

Default is 100.

Definition at line 57 of file config.cpp.

References yaclib::MakeContract(), and yaclib::detail::fiber::DefaultAllocator::SetCacheSize().

◆ SetStackSize()

void yaclib::fiber::SetStackSize ( std::uint32_t  pages)
noexcept

Sets fiber stack size for fault injection in pages.

Default is 8.

Definition at line 51 of file config.cpp.

References yaclib::detail::fiber::FiberBase::GetAllocator(), yaclib::MakeContract(), and yaclib::detail::fiber::IStackAllocator::SetMinStackSize().