Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
threads_mock.cpp File Reference

Mock of the board threads and tasks. More...

Namespaces

namespace  simulator
 Simulator dedicated namespace.
 
namespace  lampda
 Program scope.
 
namespace  lampda::platform
 Handle the platform specific interactions.
 
namespace  lampda::platform::threads
 Define tasks and threads specifics.
 

Functions

void lampda::platform::threads::start_thread (taskfunc_t taskFunction, const char *const taskName, const int priority, const int stackSize)
 Start a separate thread, running until the system shuts off.
 
void lampda::platform::threads::start_suspended_thread (taskfunc_t taskFunction, const char *const taskName, const int priority, const int stackSize)
 Start a separate thread, running until the system shuts off. Start in suspended state.
 
void lampda::platform::threads::yield_this_thread ()
 make this thread pass the control to other threads
 
void lampda::platform::threads::suspend_this_thread ()
 threads can only suspend itself
 
void lampda::platform::threads::suspend_all_threads ()
 Suspend all threads.
 
int lampda::platform::threads::is_all_suspended ()
 check that all threads are suspended (mandatory for sleep mode)
 
void lampda::platform::threads::resume_thread (const char *const taskName)
 resume a target thread
 
void lampda::platform::threads::notify_thread (const char *const taskName, int wakeUpEvent)
 notify a thread to resume
 
int lampda::platform::threads::wait_notification (const int timeout_ms)
 block this thread until a timeout or notification is received
 
void lampda::platform::threads::get_thread_debug (char *textBuff)
 

Variables

std::vector< std::thread > simulator::threadPool
 
bool simulator::isSuspended = false
 

Detailed Description

Mock of the board threads and tasks.