blob: d1e55ec426ca90a5268ee26bf98f65bdf5263c43 [file] [log] [blame]
Russ Cox580ef3e2014-11-11 17:07:37 -05001// created by cgo -cdefs and then converted to Go
2// cgo -cdefs defs_windows.go
3
4package runtime
5
6const (
7 _PROT_NONE = 0
8 _PROT_READ = 1
9 _PROT_WRITE = 2
10 _PROT_EXEC = 4
11
12 _MAP_ANON = 1
13 _MAP_PRIVATE = 2
14
15 _DUPLICATE_SAME_ACCESS = 0x2
16 _THREAD_PRIORITY_HIGHEST = 0x2
17
Russ Cox580ef3e2014-11-11 17:07:37 -050018 _SIGINT = 0x2
19 _CTRL_C_EVENT = 0x0
20 _CTRL_BREAK_EVENT = 0x1
21
22 _CONTEXT_CONTROL = 0x100001
23 _CONTEXT_FULL = 0x10000b
24
25 _EXCEPTION_ACCESS_VIOLATION = 0xc0000005
26 _EXCEPTION_BREAKPOINT = 0x80000003
27 _EXCEPTION_FLT_DENORMAL_OPERAND = 0xc000008d
28 _EXCEPTION_FLT_DIVIDE_BY_ZERO = 0xc000008e
29 _EXCEPTION_FLT_INEXACT_RESULT = 0xc000008f
30 _EXCEPTION_FLT_OVERFLOW = 0xc0000091
31 _EXCEPTION_FLT_UNDERFLOW = 0xc0000093
32 _EXCEPTION_INT_DIVIDE_BY_ZERO = 0xc0000094
33 _EXCEPTION_INT_OVERFLOW = 0xc0000095
34
35 _INFINITE = 0xffffffff
36 _WAIT_TIMEOUT = 0x102
37
38 _EXCEPTION_CONTINUE_EXECUTION = -0x1
39 _EXCEPTION_CONTINUE_SEARCH = 0x0
40)
41
42type systeminfo struct {
43 anon0 [4]byte
44 dwpagesize uint32
45 lpminimumapplicationaddress *byte
46 lpmaximumapplicationaddress *byte
47 dwactiveprocessormask uint64
48 dwnumberofprocessors uint32
49 dwprocessortype uint32
50 dwallocationgranularity uint32
51 wprocessorlevel uint16
52 wprocessorrevision uint16
53}
54
55type exceptionrecord struct {
56 exceptioncode uint32
57 exceptionflags uint32
58 exceptionrecord *exceptionrecord
59 exceptionaddress *byte
60 numberparameters uint32
61 pad_cgo_0 [4]byte
62 exceptioninformation [15]uint64
63}
64
65type m128a struct {
66 low uint64
67 high int64
68}
69
70type context struct {
71 p1home uint64
72 p2home uint64
73 p3home uint64
74 p4home uint64
75 p5home uint64
76 p6home uint64
77 contextflags uint32
78 mxcsr uint32
79 segcs uint16
80 segds uint16
81 seges uint16
82 segfs uint16
83 seggs uint16
84 segss uint16
85 eflags uint32
86 dr0 uint64
87 dr1 uint64
88 dr2 uint64
89 dr3 uint64
90 dr6 uint64
91 dr7 uint64
92 rax uint64
93 rcx uint64
94 rdx uint64
95 rbx uint64
96 rsp uint64
97 rbp uint64
98 rsi uint64
99 rdi uint64
100 r8 uint64
101 r9 uint64
102 r10 uint64
103 r11 uint64
104 r12 uint64
105 r13 uint64
106 r14 uint64
107 r15 uint64
108 rip uint64
109 anon0 [512]byte
110 vectorregister [26]m128a
111 vectorcontrol uint64
112 debugcontrol uint64
113 lastbranchtorip uint64
114 lastbranchfromrip uint64
115 lastexceptiontorip uint64
116 lastexceptionfromrip uint64
117}
118
Alex Brainman5c4a86d2015-01-14 12:25:55 +1100119func (c *context) ip() uintptr { return uintptr(c.rip) }
120func (c *context) sp() uintptr { return uintptr(c.rsp) }
121
122func (c *context) setip(x uintptr) { c.rip = uint64(x) }
123func (c *context) setsp(x uintptr) { c.rsp = uint64(x) }
124
Russ Cox580ef3e2014-11-11 17:07:37 -0500125type overlapped struct {
126 internal uint64
127 internalhigh uint64
128 anon0 [8]byte
129 hevent *byte
130}