...

Source file src/runtime/defs_linux_amd64.go

     1	// created by cgo -cdefs and then converted to Go
     2	// cgo -cdefs defs_linux.go defs1_linux.go
     3	
     4	package runtime
     5	
     6	const (
     7		_EINTR  = 0x4
     8		_EAGAIN = 0xb
     9		_ENOMEM = 0xc
    10	
    11		_PROT_NONE  = 0x0
    12		_PROT_READ  = 0x1
    13		_PROT_WRITE = 0x2
    14		_PROT_EXEC  = 0x4
    15	
    16		_MAP_ANON    = 0x20
    17		_MAP_PRIVATE = 0x2
    18		_MAP_FIXED   = 0x10
    19	
    20		_MADV_DONTNEED   = 0x4
    21		_MADV_FREE       = 0x8
    22		_MADV_HUGEPAGE   = 0xe
    23		_MADV_NOHUGEPAGE = 0xf
    24	
    25		_SA_RESTART  = 0x10000000
    26		_SA_ONSTACK  = 0x8000000
    27		_SA_RESTORER = 0x4000000
    28		_SA_SIGINFO  = 0x4
    29	
    30		_SIGHUP    = 0x1
    31		_SIGINT    = 0x2
    32		_SIGQUIT   = 0x3
    33		_SIGILL    = 0x4
    34		_SIGTRAP   = 0x5
    35		_SIGABRT   = 0x6
    36		_SIGBUS    = 0x7
    37		_SIGFPE    = 0x8
    38		_SIGKILL   = 0x9
    39		_SIGUSR1   = 0xa
    40		_SIGSEGV   = 0xb
    41		_SIGUSR2   = 0xc
    42		_SIGPIPE   = 0xd
    43		_SIGALRM   = 0xe
    44		_SIGSTKFLT = 0x10
    45		_SIGCHLD   = 0x11
    46		_SIGCONT   = 0x12
    47		_SIGSTOP   = 0x13
    48		_SIGTSTP   = 0x14
    49		_SIGTTIN   = 0x15
    50		_SIGTTOU   = 0x16
    51		_SIGURG    = 0x17
    52		_SIGXCPU   = 0x18
    53		_SIGXFSZ   = 0x19
    54		_SIGVTALRM = 0x1a
    55		_SIGPROF   = 0x1b
    56		_SIGWINCH  = 0x1c
    57		_SIGIO     = 0x1d
    58		_SIGPWR    = 0x1e
    59		_SIGSYS    = 0x1f
    60	
    61		_FPE_INTDIV = 0x1
    62		_FPE_INTOVF = 0x2
    63		_FPE_FLTDIV = 0x3
    64		_FPE_FLTOVF = 0x4
    65		_FPE_FLTUND = 0x5
    66		_FPE_FLTRES = 0x6
    67		_FPE_FLTINV = 0x7
    68		_FPE_FLTSUB = 0x8
    69	
    70		_BUS_ADRALN = 0x1
    71		_BUS_ADRERR = 0x2
    72		_BUS_OBJERR = 0x3
    73	
    74		_SEGV_MAPERR = 0x1
    75		_SEGV_ACCERR = 0x2
    76	
    77		_ITIMER_REAL    = 0x0
    78		_ITIMER_VIRTUAL = 0x1
    79		_ITIMER_PROF    = 0x2
    80	
    81		_EPOLLIN       = 0x1
    82		_EPOLLOUT      = 0x4
    83		_EPOLLERR      = 0x8
    84		_EPOLLHUP      = 0x10
    85		_EPOLLRDHUP    = 0x2000
    86		_EPOLLET       = 0x80000000
    87		_EPOLL_CLOEXEC = 0x80000
    88		_EPOLL_CTL_ADD = 0x1
    89		_EPOLL_CTL_DEL = 0x2
    90		_EPOLL_CTL_MOD = 0x3
    91	
    92		_AF_UNIX    = 0x1
    93		_F_SETFL    = 0x4
    94		_SOCK_DGRAM = 0x2
    95	)
    96	
    97	type timespec struct {
    98		tv_sec  int64
    99		tv_nsec int64
   100	}
   101	
   102	//go:nosplit
   103	func (ts *timespec) setNsec(ns int64) {
   104		ts.tv_sec = ns / 1e9
   105		ts.tv_nsec = ns % 1e9
   106	}
   107	
   108	type timeval struct {
   109		tv_sec  int64
   110		tv_usec int64
   111	}
   112	
   113	func (tv *timeval) set_usec(x int32) {
   114		tv.tv_usec = int64(x)
   115	}
   116	
   117	type sigactiont struct {
   118		sa_handler  uintptr
   119		sa_flags    uint64
   120		sa_restorer uintptr
   121		sa_mask     uint64
   122	}
   123	
   124	type siginfo struct {
   125		si_signo int32
   126		si_errno int32
   127		si_code  int32
   128		// below here is a union; si_addr is the only field we use
   129		si_addr uint64
   130	}
   131	
   132	type itimerval struct {
   133		it_interval timeval
   134		it_value    timeval
   135	}
   136	
   137	type epollevent struct {
   138		events uint32
   139		data   [8]byte // unaligned uintptr
   140	}
   141	
   142	// created by cgo -cdefs and then converted to Go
   143	// cgo -cdefs defs_linux.go defs1_linux.go
   144	
   145	const (
   146		_O_RDONLY  = 0x0
   147		_O_CLOEXEC = 0x80000
   148	)
   149	
   150	type usigset struct {
   151		__val [16]uint64
   152	}
   153	
   154	type fpxreg struct {
   155		significand [4]uint16
   156		exponent    uint16
   157		padding     [3]uint16
   158	}
   159	
   160	type xmmreg struct {
   161		element [4]uint32
   162	}
   163	
   164	type fpstate struct {
   165		cwd       uint16
   166		swd       uint16
   167		ftw       uint16
   168		fop       uint16
   169		rip       uint64
   170		rdp       uint64
   171		mxcsr     uint32
   172		mxcr_mask uint32
   173		_st       [8]fpxreg
   174		_xmm      [16]xmmreg
   175		padding   [24]uint32
   176	}
   177	
   178	type fpxreg1 struct {
   179		significand [4]uint16
   180		exponent    uint16
   181		padding     [3]uint16
   182	}
   183	
   184	type xmmreg1 struct {
   185		element [4]uint32
   186	}
   187	
   188	type fpstate1 struct {
   189		cwd       uint16
   190		swd       uint16
   191		ftw       uint16
   192		fop       uint16
   193		rip       uint64
   194		rdp       uint64
   195		mxcsr     uint32
   196		mxcr_mask uint32
   197		_st       [8]fpxreg1
   198		_xmm      [16]xmmreg1
   199		padding   [24]uint32
   200	}
   201	
   202	type fpreg1 struct {
   203		significand [4]uint16
   204		exponent    uint16
   205	}
   206	
   207	type stackt struct {
   208		ss_sp     *byte
   209		ss_flags  int32
   210		pad_cgo_0 [4]byte
   211		ss_size   uintptr
   212	}
   213	
   214	type mcontext struct {
   215		gregs       [23]uint64
   216		fpregs      *fpstate
   217		__reserved1 [8]uint64
   218	}
   219	
   220	type ucontext struct {
   221		uc_flags     uint64
   222		uc_link      *ucontext
   223		uc_stack     stackt
   224		uc_mcontext  mcontext
   225		uc_sigmask   usigset
   226		__fpregs_mem fpstate
   227	}
   228	
   229	type sigcontext struct {
   230		r8          uint64
   231		r9          uint64
   232		r10         uint64
   233		r11         uint64
   234		r12         uint64
   235		r13         uint64
   236		r14         uint64
   237		r15         uint64
   238		rdi         uint64
   239		rsi         uint64
   240		rbp         uint64
   241		rbx         uint64
   242		rdx         uint64
   243		rax         uint64
   244		rcx         uint64
   245		rsp         uint64
   246		rip         uint64
   247		eflags      uint64
   248		cs          uint16
   249		gs          uint16
   250		fs          uint16
   251		__pad0      uint16
   252		err         uint64
   253		trapno      uint64
   254		oldmask     uint64
   255		cr2         uint64
   256		fpstate     *fpstate1
   257		__reserved1 [8]uint64
   258	}
   259	
   260	type sockaddr_un struct {
   261		family uint16
   262		path   [108]byte
   263	}
   264	

View as plain text