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

View as plain text