Modules | |
| group | Architecture support for multi-threading |
| group | Multi-threading library convenience functions |
Defines | |
| #define | MT_OK |
| No error. | |
Functions | |
| void | mt_init (void) |
| Initializes the multithreading library. | |
| void | mt_remove (void) |
| Uninstalls library and cleans up. | |
| void | mt_start (struct mt_thread *thread, void(*function)(void *), void *data) |
| Starts a multithreading thread. | |
| void | mt_exec (struct mt_thread *thread) |
| Start executing a thread. | |
| void | mt_exec_event (struct mt_thread *thread, ek_event_t s, ek_data_t data) |
| Post an event to a thread. | |
| void | mt_yield (void) |
| Voluntarily give up the processor. | |
| void | mt_post (ek_id_t id, ek_event_t s, ek_data_t data) |
| Emit a signal to another process. | |
| void | mt_wait (ek_event_t *s, ek_data_t *data) |
| Block and wait for an event to occur. | |
| void | mt_exit (void) |
| Exit a thread. | |
|
|
Start executing a thread. This function is called by a Contiki process and starts running a thread. The function does not return until the thread has yielded, or is preempted.
|
|
||||||||||||||||
|
Post an event to a thread. This function posts an event to a thread. The thread will be scheduled if the thread currently is waiting for the posted event number. If the thread is not waiting for the event, this function does nothing.
|
|
|
Exit a thread. This function is called from within an executing thread in order to exit the thread. The function never returns. |
|
||||||||||||||||
|
Emit a signal to another process. This function is called by a running thread and will emit a signal to another Contiki process. This will cause the currently executing thread to yield.
|
|
||||||||||||||||
|
Starts a multithreading thread.
|
|
||||||||||||
|
Block and wait for an event to occur. This function can be called by a running thread in order to block and wait for an event. The function returns when an event has occured. The event number and the associated data are placed in the variables pointed to by the function arguments. |
|
|
Voluntarily give up the processor. This function is called by a running thread in order to give up control of the CPU. |
1.3.6