Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Examples

mt.h File Reference


Detailed Description

Header file for the preemptive multitasking library for Contiki.

Author:
Adam Dunkels <adam@sics.se>

Definition in file mt.h.

#include "contiki.h"
#include "mtarch.h"

Go to the source code of this file.

Data Structures

struct  mt_thread
struct  mt_process

Defines

#define MT_OK
 No error.
#define MT_PROCESS(name, strname)
 Declare a multithreaded process.

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.
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)
 Execute parts of a thread.
void mt_exec_event (struct mt_thread *thread, process_event_t s, process_data_t data)
 Post an event to a thread.
void mt_yield (void)
 Voluntarily give up the processor.
void mt_post (struct process *p, process_event_t ev, process_data_t data)
 Post an event to another process.
void mt_wait (process_event_t *ev, process_data_t *data)
 Block and wait for an event to occur.
void mt_exit (void)
 Exit a thread.
void mtp_start (struct mt_process *p, void(*function)(void *), void *data)
 Start a thread.
void mtp_exit (void)


Generated on Thu Jun 22 17:45:43 2006 for Contiki 2.x by  doxygen 1.4.4