1// Copyright 2009 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5//go:build ignore
6
7/*
8Input to cgo.
9
10GOARCH=amd64 go tool cgo -cdefs defs_darwin.go >defs_darwin_amd64.h
11*/
12
13package runtime
14
15/*
16#define __DARWIN_UNIX03 0
17#include <mach/mach_time.h>
18#include <sys/types.h>
19#include <sys/time.h>
20#include <errno.h>
21#include <signal.h>
22#include <sys/event.h>
23#include <sys/mman.h>
24#include <pthread.h>
25#include <fcntl.h>
26*/
27import "C"
28
29const (
30	EINTR     = C.EINTR
31	EFAULT    = C.EFAULT
32	EAGAIN    = C.EAGAIN
33	ETIMEDOUT = C.ETIMEDOUT
34
35	PROT_NONE  = C.PROT_NONE
36	PROT_READ  = C.PROT_READ
37	PROT_WRITE = C.PROT_WRITE
38	PROT_EXEC  = C.PROT_EXEC
39
40	MAP_ANON    = C.MAP_ANON
41	MAP_PRIVATE = C.MAP_PRIVATE
42	MAP_FIXED   = C.MAP_FIXED
43
44	MADV_DONTNEED      = C.MADV_DONTNEED
45	MADV_FREE          = C.MADV_FREE
46	MADV_FREE_REUSABLE = C.MADV_FREE_REUSABLE
47	MADV_FREE_REUSE    = C.MADV_FREE_REUSE
48
49	SA_SIGINFO   = C.SA_SIGINFO
50	SA_RESTART   = C.SA_RESTART
51	SA_ONSTACK   = C.SA_ONSTACK
52	SA_USERTRAMP = C.SA_USERTRAMP
53	SA_64REGSET  = C.SA_64REGSET
54
55	SIGHUP    = C.SIGHUP
56	SIGINT    = C.SIGINT
57	SIGQUIT   = C.SIGQUIT
58	SIGILL    = C.SIGILL
59	SIGTRAP   = C.SIGTRAP
60	SIGABRT   = C.SIGABRT
61	SIGEMT    = C.SIGEMT
62	SIGFPE    = C.SIGFPE
63	SIGKILL   = C.SIGKILL
64	SIGBUS    = C.SIGBUS
65	SIGSEGV   = C.SIGSEGV
66	SIGSYS    = C.SIGSYS
67	SIGPIPE   = C.SIGPIPE
68	SIGALRM   = C.SIGALRM
69	SIGTERM   = C.SIGTERM
70	SIGURG    = C.SIGURG
71	SIGSTOP   = C.SIGSTOP
72	SIGTSTP   = C.SIGTSTP
73	SIGCONT   = C.SIGCONT
74	SIGCHLD   = C.SIGCHLD
75	SIGTTIN   = C.SIGTTIN
76	SIGTTOU   = C.SIGTTOU
77	SIGIO     = C.SIGIO
78	SIGXCPU   = C.SIGXCPU
79	SIGXFSZ   = C.SIGXFSZ
80	SIGVTALRM = C.SIGVTALRM
81	SIGPROF   = C.SIGPROF
82	SIGWINCH  = C.SIGWINCH
83	SIGINFO   = C.SIGINFO
84	SIGUSR1   = C.SIGUSR1
85	SIGUSR2   = C.SIGUSR2
86
87	FPE_INTDIV = C.FPE_INTDIV
88	FPE_INTOVF = C.FPE_INTOVF
89	FPE_FLTDIV = C.FPE_FLTDIV
90	FPE_FLTOVF = C.FPE_FLTOVF
91	FPE_FLTUND = C.FPE_FLTUND
92	FPE_FLTRES = C.FPE_FLTRES
93	FPE_FLTINV = C.FPE_FLTINV
94	FPE_FLTSUB = C.FPE_FLTSUB
95
96	BUS_ADRALN = C.BUS_ADRALN
97	BUS_ADRERR = C.BUS_ADRERR
98	BUS_OBJERR = C.BUS_OBJERR
99
100	SEGV_MAPERR = C.SEGV_MAPERR
101	SEGV_ACCERR = C.SEGV_ACCERR
102
103	ITIMER_REAL    = C.ITIMER_REAL
104	ITIMER_VIRTUAL = C.ITIMER_VIRTUAL
105	ITIMER_PROF    = C.ITIMER_PROF
106
107	EV_ADD       = C.EV_ADD
108	EV_DELETE    = C.EV_DELETE
109	EV_CLEAR     = C.EV_CLEAR
110	EV_RECEIPT   = C.EV_RECEIPT
111	EV_ERROR     = C.EV_ERROR
112	EV_EOF       = C.EV_EOF
113	EVFILT_READ  = C.EVFILT_READ
114	EVFILT_WRITE = C.EVFILT_WRITE
115
116	PTHREAD_CREATE_DETACHED = C.PTHREAD_CREATE_DETACHED
117
118	F_SETFD    = C.F_SETFD
119	F_GETFL    = C.F_GETFL
120	F_SETFL    = C.F_SETFL
121	FD_CLOEXEC = C.FD_CLOEXEC
122
123	O_NONBLOCK = C.O_NONBLOCK
124)
125
126type StackT C.struct_sigaltstack
127type Sighandler C.union___sigaction_u
128
129type Sigaction C.struct___sigaction // used in syscalls
130type Usigaction C.struct_sigaction  // used by sigaction second argument
131type Sigset C.sigset_t
132type Sigval C.union_sigval
133type Siginfo C.siginfo_t
134type Timeval C.struct_timeval
135type Itimerval C.struct_itimerval
136type Timespec C.struct_timespec
137
138type FPControl C.struct_fp_control
139type FPStatus C.struct_fp_status
140type RegMMST C.struct_mmst_reg
141type RegXMM C.struct_xmm_reg
142
143type Regs64 C.struct_x86_thread_state64
144type FloatState64 C.struct_x86_float_state64
145type ExceptionState64 C.struct_x86_exception_state64
146type Mcontext64 C.struct_mcontext64
147
148type Regs32 C.struct_i386_thread_state
149type FloatState32 C.struct_i386_float_state
150type ExceptionState32 C.struct_i386_exception_state
151type Mcontext32 C.struct_mcontext32
152
153type Ucontext C.struct_ucontext
154
155type Kevent C.struct_kevent
156
157type Pthread C.pthread_t
158type PthreadAttr C.pthread_attr_t
159type PthreadMutex C.pthread_mutex_t
160type PthreadMutexAttr C.pthread_mutexattr_t
161type PthreadCond C.pthread_cond_t
162type PthreadCondAttr C.pthread_condattr_t
163
164type MachTimebaseInfo C.mach_timebase_info_data_t
165