|
Lamp-Da 0.1
A compact lantern project
|
Define tasks and threads specifics. More...
Typedefs | |
| typedef void(* | taskfunc_t) (void) |
| model of a task function | |
Functions | |
| static void | _redirect_task (void *arg) |
| static void | _redirect_suspend_task (void *arg) |
| void | 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 | 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 | yield_this_thread () |
| make this thread pass the control to other threads | |
| void | suspend_this_thread () |
| threads can only suspend itself | |
| void | suspend_all_threads () |
| Suspend all threads. | |
| int | is_all_suspended () |
| check that all threads are suspended (mandatory for sleep mode) | |
| void | resume_thread (const char *const taskName) |
| resume a target thread | |
| void | notify_thread (const char *const taskName, int wakeUpEvent) |
| notify a thread to resume | |
| int | wait_notification (const int timeout_ms) |
| block this thread until a timeout or notification is received | |
| void | get_thread_debug (char *textBuff) |
Define tasks and threads specifics.
| int lampda::platform::threads::is_all_suspended | ( | ) |
check that all threads are suspended (mandatory for sleep mode)
| void lampda::platform::threads::notify_thread | ( | const char *const | taskName, |
| int | wakeUpEvent | ||
| ) |
notify a thread to resume
| [in] | taskName | target task name |
| [in] | wakeUpEvent | type of the event to send |
| void lampda::platform::threads::resume_thread | ( | const char *const | taskName | ) |
resume a target thread
| [in] | taskName | target task name |
| 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.
| taskFunction | the function to run | |
| [in] | taskName | The name associated |
| [in] | priority | from to 2, this thread priority |
| [in] | stackSize | The size of the stack to allocate. can be ignored and checked while running using the command line |
| 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.
| taskFunction | the function to run | |
| [in] | taskName | The name associated |
| [in] | priority | from to 2, this thread priority |
| [in] | stackSize | The size of the stack to allocate. can be ignored and checked while running using the command line |
| void lampda::platform::threads::suspend_all_threads | ( | ) |
Suspend all threads.
| int lampda::platform::threads::wait_notification | ( | const int | timeout_ms | ) |
block this thread until a timeout or notification is received
| [in] | timeout_ms | Timeout delay. Can be zero of less for no timeout |