My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
cpu_task.c File Reference
#include <sw_types.h>
#include <task.h>
#include <cpu_task.h>
#include <sw_debug.h>
#include <cpu.h>
#include <unused.h>

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, core_registers **core_regs)
 Save task context. More...
 
void restore_task_context_regs (struct sw_task_cpu_regs *regs, core_registers **core_regs)
 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. 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,
core_registers **  core_regs 
)

Restore task context.

Parameters
regspointer to the task registers
core_regspointer to the task registers
void save_task_context_regs ( struct sw_task_cpu_regs regs,
core_registers **  core_regs 
)

Save task context.

Parameters
regspointer to the task registers
core_regspointer to the core registers