My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Functions
cpu_task.h File Reference

Go to the source code of this file.

Classes

struct  sw_task_cpu_regs
 Task registers context. More...
 

Functions

int cpu_task_init (void *task)
 Archiecture specific task init function. More...
 
int cpu_task_exit (void *task)
 Archiecture specific task exit function. More...
 
void print_cpu_task_regs (void *task)
 Print task register values. More...
 
void save_task_context_regs (struct sw_task_cpu_regs *regs, struct sw_task_cpu_regs **cregs)
 Save task context. More...
 
void restore_task_context_regs (struct sw_task_cpu_regs *regs, struct sw_task_cpu_regs **cregs)
 Restore task context. More...
 

Function Documentation

int cpu_task_exit ( void *  task)

Archiecture specific task exit function.

Thius function get called before the task destruction.

Parameters
taskPointer to task structure
Returns
otz_return_t: OTZ_OK
OTZ_* - An implementation-defined error code for any other error.
int cpu_task_init ( void *  task)

Archiecture specific task init function.

This function get called from start task operation

Parameters
taskPointer to task structure
Returns
otz_return_t: OTZ_OK
OTZ_* - An implementation-defined error code for any other error.
This function get called from start task operation. Initialize task registers.
Parameters
taskPointer to task structure
Returns
otz_return_t: OTZ_OK
OTZ_* - An implementation-defined error code for any other error.
void print_cpu_task_regs ( void *  task)

Print task register values.

Parameters
taskPointer to the task structure
void restore_task_context_regs ( struct sw_task_cpu_regs regs,
struct sw_task_cpu_regs **  cregs 
)

Restore task context.

This function used to restore the task context registers

Parameters
regsPointer task registers structure
void save_task_context_regs ( struct sw_task_cpu_regs regs,
struct sw_task_cpu_regs **  cregs 
)

Save task context.

This function used to save the task context registers

Parameters
regsPointer task registers structure