Source file src/runtime/os_openbsd_syscall2.go

     1  // Copyright 2020 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 openbsd && mips64
     6  
     7  package runtime
     8  
     9  import (
    10  	"unsafe"
    11  )
    12  
    13  //go:noescape
    14  func sigaction(sig uint32, new, old *sigactiont)
    15  
    16  func kqueue() int32
    17  
    18  //go:noescape
    19  func kevent(kq int32, ch *keventt, nch int32, ev *keventt, nev int32, ts *timespec) int32
    20  
    21  func raiseproc(sig uint32)
    22  
    23  func getthrid() int32
    24  func thrkill(tid int32, sig int)
    25  
    26  // read calls the read system call.
    27  // It returns a non-negative number of bytes written or a negative errno value.
    28  func read(fd int32, p unsafe.Pointer, n int32) int32
    29  
    30  func closefd(fd int32) int32
    31  
    32  func exit(code int32)
    33  func usleep(usec uint32)
    34  
    35  //go:nosplit
    36  func usleep_no_g(usec uint32) {
    37  	usleep(usec)
    38  }
    39  
    40  // write calls the write system call.
    41  // It returns a non-negative number of bytes written or a negative errno value.
    42  //
    43  //go:noescape
    44  func write1(fd uintptr, p unsafe.Pointer, n int32) int32
    45  
    46  //go:noescape
    47  func open(name *byte, mode, perm int32) int32
    48  
    49  // return value is only set on linux to be used in osinit()
    50  func madvise(addr unsafe.Pointer, n uintptr, flags int32) int32
    51  
    52  // exitThread terminates the current thread, writing *wait = 0 when
    53  // the stack is safe to reclaim.
    54  //
    55  //go:noescape
    56  func exitThread(wait *uint32)
    57  
    58  //go:noescape
    59  func obsdsigprocmask(how int32, new sigset) sigset
    60  
    61  //go:nosplit
    62  //go:nowritebarrierrec
    63  func sigprocmask(how int32, new, old *sigset) {
    64  	n := sigset(0)
    65  	if new != nil {
    66  		n = *new
    67  	}
    68  	r := obsdsigprocmask(how, n)
    69  	if old != nil {
    70  		*old = r
    71  	}
    72  }
    73  
    74  func pipe2(flags int32) (r, w int32, errno int32)
    75  
    76  //go:noescape
    77  func setitimer(mode int32, new, old *itimerval)
    78  
    79  //go:noescape
    80  func sysctl(mib *uint32, miblen uint32, out *byte, size *uintptr, dst *byte, ndst uintptr) int32
    81  
    82  // mmap calls the mmap system call. It is implemented in assembly.
    83  // We only pass the lower 32 bits of file offset to the
    84  // assembly routine; the higher bits (if required), should be provided
    85  // by the assembly routine as 0.
    86  // The err result is an OS error code such as ENOMEM.
    87  func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (p unsafe.Pointer, err int)
    88  
    89  // munmap calls the munmap system call. It is implemented in assembly.
    90  func munmap(addr unsafe.Pointer, n uintptr)
    91  
    92  func nanotime1() int64
    93  
    94  //go:noescape
    95  func sigaltstack(new, old *stackt)
    96  
    97  func closeonexec(fd int32)
    98  
    99  func walltime() (sec int64, nsec int32)
   100  

View as plain text