]>
Commit | Line | Data |
---|---|---|
2aa62f2b | 1 | /* $NetBSD: pcb.h,v 1.1 2006/04/07 14:21:18 cherry Exp $ */\r |
2 | \r | |
3 | /*-\r | |
4 | * Copyright (c) 2003,2004 Marcel Moolenaar\r | |
5 | * Copyright (c) 2000 Doug Rabson\r | |
6 | * All rights reserved.\r | |
7 | *\r | |
8 | * Redistribution and use in source and binary forms, with or without\r | |
9 | * modification, are permitted provided that the following conditions\r | |
10 | * are met:\r | |
11 | * 1. Redistributions of source code must retain the above copyright\r | |
12 | * notice, this list of conditions and the following disclaimer.\r | |
13 | * 2. Redistributions in binary form must reproduce the above copyright\r | |
14 | * notice, this list of conditions and the following disclaimer in the\r | |
15 | * documentation and/or other materials provided with the distribution.\r | |
16 | *\r | |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\r | |
18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r | |
19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r | |
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\r | |
21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r | |
22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r | |
23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r | |
24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r | |
25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r | |
26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r | |
27 | * SUCH DAMAGE.\r | |
28 | *\r | |
29 | * $FreeBSD: src/sys/ia64/include/pcb.h,v 1.16 2004/08/16 19:05:08 marcel Exp $\r | |
30 | */\r | |
31 | \r | |
32 | #ifndef _IA64_PCB_H_\r | |
33 | #define _IA64_PCB_H_\r | |
34 | \r | |
35 | #include <machine/_regset.h>\r | |
36 | #include <sys/lock.h>\r | |
37 | \r | |
38 | /*\r | |
39 | * PCB: process control block\r | |
40 | */\r | |
41 | struct pmap;\r | |
42 | struct pcb {\r | |
43 | struct _special pcb_special;\r | |
44 | struct _callee_saved pcb_preserved;\r | |
45 | struct _callee_saved_fp pcb_preserved_fp;\r | |
46 | struct _high_fp pcb_high_fp;\r | |
47 | struct pcpu *pcb_fpcpu;\r | |
48 | struct simplelock pcb_fpcpu_slock;\r | |
49 | \r | |
50 | \r | |
51 | /* IA32 specific registers. */\r | |
52 | uint64_t pcb_ia32_cflg;\r | |
53 | uint64_t pcb_ia32_eflag;\r | |
54 | uint64_t pcb_ia32_fcr;\r | |
55 | uint64_t pcb_ia32_fdr;\r | |
56 | uint64_t pcb_ia32_fir;\r | |
57 | uint64_t pcb_ia32_fsr;\r | |
58 | \r | |
59 | uint64_t pcb_onfault; /* for copy faults */\r | |
60 | // struct pmap *pcb_current_pmap;\r | |
61 | };\r | |
62 | \r | |
63 | #ifdef _KERNEL\r | |
64 | \r | |
65 | #define savectx(p) swapctx(p, NULL)\r | |
66 | \r | |
67 | struct trapframe;\r | |
68 | \r | |
69 | void makectx(struct trapframe *, struct pcb *);\r | |
70 | /*void restorectx(struct pcb *) __dead2;*/\r | |
71 | int swapctx(struct pcb *old, struct pcb *new);\r | |
72 | \r | |
73 | void ia32_restorectx(struct pcb *);\r | |
74 | void ia32_savectx(struct pcb *);\r | |
75 | \r | |
76 | #endif\r | |
77 | \r | |
78 | #endif /* _IA64_PCB_H_ */\r |