Black Lives Matter. Support the Equal Justice Initiative.

Source file src/runtime/stubs2.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 !aix && !darwin && !js && !openbsd && !plan9 && !solaris && !windows
     6  // +build !aix,!darwin,!js,!openbsd,!plan9,!solaris,!windows
     7  
     8  package runtime
     9  
    10  import "unsafe"
    11  
    12  // read calls the read system call.
    13  // It returns a non-negative number of bytes written or a negative errno value.
    14  func read(fd int32, p unsafe.Pointer, n int32) int32
    15  
    16  func closefd(fd int32) int32
    17  
    18  func exit(code int32)
    19  func usleep(usec uint32)
    20  
    21  //go:nosplit
    22  func usleep_no_g(usec uint32) {
    23  	usleep(usec)
    24  }
    25  
    26  // write calls the write system call.
    27  // It returns a non-negative number of bytes written or a negative errno value.
    28  //go:noescape
    29  func write1(fd uintptr, p unsafe.Pointer, n int32) int32
    30  
    31  //go:noescape
    32  func open(name *byte, mode, perm int32) int32
    33  
    34  // return value is only set on linux to be used in osinit()
    35  func madvise(addr unsafe.Pointer, n uintptr, flags int32) int32
    36  
    37  // exitThread terminates the current thread, writing *wait = 0 when
    38  // the stack is safe to reclaim.
    39  //
    40  //go:noescape
    41  func exitThread(wait *uint32)
    42  

View as plain text