1// Licensed to Elasticsearch B.V. under one or more contributor
2// license agreements. See the NOTICE file distributed with
3// this work for additional information regarding copyright
4// ownership. Elasticsearch B.V. licenses this file to you under
5// the Apache License, Version 2.0 (the "License"); you may
6// not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9//     http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied.  See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18// Created by cgo -godefs - DO NOT EDIT
19// cgo -godefs defs_darwin.go
20
21package darwin
22
23type processState uint32
24
25const (
26	stateSIDL processState = iota + 1
27	stateRun
28	stateSleep
29	stateStop
30	stateZombie
31)
32
33const argMax = 0x40000
34
35type bsdInfo struct {
36	Pbi_flags        uint32
37	Pbi_status       uint32
38	Pbi_xstatus      uint32
39	Pbi_pid          uint32
40	Pbi_ppid         uint32
41	Pbi_uid          uint32
42	Pbi_gid          uint32
43	Pbi_ruid         uint32
44	Pbi_rgid         uint32
45	Pbi_svuid        uint32
46	Pbi_svgid        uint32
47	Rfu_1            uint32
48	Pbi_comm         [16]int8
49	Pbi_name         [32]int8
50	Pbi_nfiles       uint32
51	Pbi_pgid         uint32
52	Pbi_pjobc        uint32
53	E_tdev           uint32
54	E_tpgid          uint32
55	Pbi_nice         int32
56	Pbi_start_tvsec  uint64
57	Pbi_start_tvusec uint64
58}
59
60type procTaskInfo struct {
61	Virtual_size      uint64
62	Resident_size     uint64
63	Total_user        uint64
64	Total_system      uint64
65	Threads_user      uint64
66	Threads_system    uint64
67	Policy            int32
68	Faults            int32
69	Pageins           int32
70	Cow_faults        int32
71	Messages_sent     int32
72	Messages_received int32
73	Syscalls_mach     int32
74	Syscalls_unix     int32
75	Csw               int32
76	Threadnum         int32
77	Numrunning        int32
78	Priority          int32
79}
80
81type procTaskAllInfo struct {
82	Pbsd   bsdInfo
83	Ptinfo procTaskInfo
84}
85
86type vinfoStat struct {
87	Dev           uint32
88	Mode          uint16
89	Nlink         uint16
90	Ino           uint64
91	Uid           uint32
92	Gid           uint32
93	Atime         int64
94	Atimensec     int64
95	Mtime         int64
96	Mtimensec     int64
97	Ctime         int64
98	Ctimensec     int64
99	Birthtime     int64
100	Birthtimensec int64
101	Size          int64
102	Blocks        int64
103	Blksize       int32
104	Flags         uint32
105	Gen           uint32
106	Rdev          uint32
107	Qspare        [2]int64
108}
109
110type fsid struct {
111	Val [2]int32
112}
113
114type vnodeInfo struct {
115	Stat vinfoStat
116	Type int32
117	Pad  int32
118	Fsid fsid
119}
120
121type vnodeInfoPath struct {
122	Vi   vnodeInfo
123	Path [1024]int8
124}
125
126type procVnodePathInfo struct {
127	Cdir vnodeInfoPath
128	Rdir vnodeInfoPath
129}
130
131type vmStatisticsData struct {
132	Free_count        uint32
133	Active_count      uint32
134	Inactive_count    uint32
135	Wire_count        uint32
136	Zero_fill_count   uint32
137	Reactivations     uint32
138	Pageins           uint32
139	Pageouts          uint32
140	Faults            uint32
141	Cow_faults        uint32
142	Lookups           uint32
143	Hits              uint32
144	Purgeable_count   uint32
145	Purges            uint32
146	Speculative_count uint32
147}
148
149type vmStatistics64Data struct {
150	Free_count                             uint32
151	Active_count                           uint32
152	Inactive_count                         uint32
153	Wire_count                             uint32
154	Zero_fill_count                        uint64
155	Reactivations                          uint64
156	Pageins                                uint64
157	Pageouts                               uint64
158	Faults                                 uint64
159	Cow_faults                             uint64
160	Lookups                                uint64
161	Hits                                   uint64
162	Purges                                 uint64
163	Purgeable_count                        uint32
164	Speculative_count                      uint32
165	Decompressions                         uint64
166	Compressions                           uint64
167	Swapins                                uint64
168	Swapouts                               uint64
169	Compressor_page_count                  uint32
170	Throttled_count                        uint32
171	External_page_count                    uint32
172	Internal_page_count                    uint32
173	Total_uncompressed_pages_in_compressor uint64
174}
175
176type vmSize uint64
177
178const (
179	cpuStateUser   = 0x0
180	cpuStateSystem = 0x1
181	cpuStateIdle   = 0x2
182	cpuStateNice   = 0x3
183)
184
185type hostCPULoadInfo struct {
186	Ticks [4]uint32
187}
188