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

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

Classes

struct  simulator::ThreadHandle
 

Namespaces

namespace  simulator
 Simulator dedicated namespace.
 
namespace  lampda
 Program scope.
 
namespace  lampda::hal
 Hardware Abstraction Layer, handle the platform specific interactions. Can be changed to support different platforms.
 
namespace  lampda::hal::threads
 Define tasks and threads specifics.
 

Functions

uint32_t lampda::hal::threads::HAL_create_thread (TaskHandle_t *const handle, taskfunc_t task, char const *const name, const int priority, const int stackSize, const int startSuspended)
 Create a thread from the given function and return the associated handle.
 
void lampda::hal::threads::HAL_yield ()
 Yield this thread.
 
void lampda::hal::threads::HAL_suspend ()
 Suspend this thread.
 
int lampda::hal::threads::HAL_wait_notification (const int timeout_ms)
 Put this thread in suspended mode, waiting for a notification. This function wil block execution until the timeout is reached or a value is received.
 
void lampda::hal::threads::HAL_notify_thread (TaskHandle_t handle, int wakeUpEvent)
 Notify a thread with a value.
 
void lampda::hal::threads::HAL_suspend_thread (TaskHandle_t handle)
 Suspend the target thread.
 
int lampda::hal::threads::HAL_is_suspended (TaskHandle_t handle)
 Return 0 if thread is suspended.
 
void lampda::hal::threads::HAL_resume_thread (TaskHandle_t handle)
 Resume a suspended thread.
 
uint32_t lampda::hal::threads::HAL_get_task_high_water_mark_byte (TaskHandle_t handle)
 Return a task stack high water mark in bytes.
 
void lampda::hal::threads::HAL_get_debug_thread_text (char *textBuff)
 Given a buffer, return a buffer debug text.
 
void lampda::hal::threads::HAL_shutdown ()
 Shutdown the thread HAL.
 

Variables

std::map< size_t, ThreadHandle > simulator::threadPool
 
std::hash< std::thread::id > lampda::hal::threads::threadHasher
 

Detailed Description

Mock of the board threads and tasks.