Files | |
| file | mt.h |
| Header file for the preemptive multitasking library for Contiki. | |
Functions | |
| void | mtarch_init (void) |
| Initialize the architecture specific support functions for the multi-thread library. | |
| void | mtarch_remove (void) |
| Uninstall library and clean up. | |
| void | mtarch_start (struct mtarch_thread *thread, void(*function)(void *data), void *data) |
| Setup the stack frame for a thread that is being started. | |
| void | mtarch_yield (void) |
| Yield the processor. | |
| void | mtarch_exec (struct mtarch_thread *thread) |
| Start executing a thread. | |
|
|
Start executing a thread. This function is called from mt_exec() and the purpose of the function is to start execution of the thread. The function should switch in the stack of the thread, and does not return until the thread has explicitly yielded (using mt_yield()) or until it is preempted. |
|
|
Initialize the architecture specific support functions for the multi-thread library. This function is implemented by the architecture specific functions for the multi-thread library and is called by the mt_init() function as part of the initialization of the library. The mtarch_init() function can be used for, e.g., starting preemtion timers or other architecture specific mechanisms required for the operation of the library. |
|
||||||||||||||||
|
Setup the stack frame for a thread that is being started. This function is called by the mt_start() function in order to set up the architecture specific stack of the thread to be started.
|
|
|
Yield the processor. This function is called by the mt_yield() function, which is called from the running thread in order to give up the processor. |
1.3.6