Black Lives Matter. Support the Equal Justice Initiative.

Source file src/runtime/defs3_linux.go

Documentation: runtime

     1  // Copyright 2014 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  // +build ignore
     7  
     8  /*
     9  Input to cgo -cdefs
    10  
    11  GOARCH=ppc64 cgo -cdefs defs_linux.go defs3_linux.go > defs_linux_ppc64.h
    12  */
    13  
    14  package runtime
    15  
    16  /*
    17  #define size_t __kernel_size_t
    18  #define sigset_t __sigset_t // rename the sigset_t here otherwise cgo will complain about "inconsistent definitions for C.sigset_t"
    19  #define	_SYS_TYPES_H	// avoid inclusion of sys/types.h
    20  #include <asm/ucontext.h>
    21  #include <asm-generic/fcntl.h>
    22  */
    23  import "C"
    24  
    25  const (
    26  	O_RDONLY    = C.O_RDONLY
    27  	O_CLOEXEC   = C.O_CLOEXEC
    28  	SA_RESTORER = 0 // unused
    29  )
    30  
    31  type Usigset C.__sigset_t
    32  
    33  // types used in sigcontext
    34  type Ptregs C.struct_pt_regs
    35  type Gregset C.elf_gregset_t
    36  type FPregset C.elf_fpregset_t
    37  type Vreg C.elf_vrreg_t
    38  
    39  type StackT C.stack_t
    40  
    41  // PPC64 uses sigcontext in place of mcontext in ucontext.
    42  // see https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/uapi/asm/ucontext.h
    43  type Sigcontext C.struct_sigcontext
    44  type Ucontext C.struct_ucontext
    45  

View as plain text