My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cpu_task.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 /*
24  * cpu_task.h header file for cpu dependent task declarations and defintions
25  */
26 
27 #ifndef __SW_CPU_TASK_H__
28 #define __SW_CPU_TASK_H__
29 
35  u32 regs[13];
37  u32 sp;
39  u32 lr;
41  u32 spsr;
43  u32 pc;
44 };
45 
56 int cpu_task_init(void *task);
57 
69 int cpu_task_exit(void *task);
70 
76 void print_cpu_task_regs(void *task);
77 
78 /* cpu_task_context.S */
86 void save_task_context_regs(struct sw_task_cpu_regs *regs, struct sw_task_cpu_regs **cregs);
87 
95 void restore_task_context_regs(struct sw_task_cpu_regs *regs, struct sw_task_cpu_regs **cregs);
96 
97 
98 
99 #endif /* __SW_CPU_TASK_H__ */
u32 lr
Definition: cpu_task.h:39
Task registers context.
Definition: cpu_task.h:33
void restore_task_context_regs(struct sw_task_cpu_regs *regs, struct sw_task_cpu_regs **cregs)
Restore task context.
void print_cpu_task_regs(void *task)
Print task register values.
Definition: cpu_task.c:116
int cpu_task_exit(void *task)
Archiecture specific task exit function.
Definition: cpu_task.c:104
u32 spsr
Definition: cpu_task.h:41
void save_task_context_regs(struct sw_task_cpu_regs *regs, struct sw_task_cpu_regs **cregs)
Save task context.
int cpu_task_init(void *task)
Archiecture specific task init function.
Definition: cpu_task.c:84
u32 pc
Definition: cpu_task.h:43
u32 regs[13]
Definition: cpu_task.h:35
u32 sp
Definition: cpu_task.h:37