MoSync 3.3
matask.h File Reference

Task control system. More...

Functions

int maRunTaskInit (int SP, int p0, int p1)
int maRunTask (int SP)
void maYield (void)
void maKillTask (void)
int InitTasks (int max_tasks)
 Initialise the task system.
void DisposeTasks (void)
 Dispose the task system.
void DisposeTask (short task)
 Dispose a specific task.
void SetTaskStackSize (int size)
 Sets the current task stack size.
long CreateTask (char *TaskAddr, int p0, int p1)
 Create a new cooperative task.
void RunAllTasks (void)
 Execute all cooperative tasks.

Detailed Description

Task control system.

Author:
Fredrik Eldh

Function Documentation

int maRunTaskInit ( int  SP,
int  p0,
int  p1 
)
int maRunTask ( int  SP)
void maYield ( void  )
void maKillTask ( void  )
int InitTasks ( int  max_tasks)

Initialise the task system.

Parameters:
max_tasksSet the maximum amount of tasks.
Returns:
Returns TRUE if all was well.
void DisposeTasks ( void  )

Dispose the task system.

void DisposeTask ( short  task)

Dispose a specific task.

Parameters:
taskThe task to dispose.
void SetTaskStackSize ( int  size)

Sets the current task stack size.

Parameters:
sizeThe size of the new current stack size
long CreateTask ( char *  TaskAddr,
int  p0,
int  p1 
)

Create a new cooperative task.

Parameters:
TaskAddrThe address of the new task
p0The first parameter to be passed to the new task
p1The second parameter to be passed to the new task
Returns:
Returns a positive taskid if all was well, null on error.
void RunAllTasks ( void  )

Execute all cooperative tasks.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines