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  // +build !aix
     6  // +build !darwin
     7  // +build !js
     8  // +build !openbsd
     9  // +build !plan9
    10  // +build !solaris
    11  // +build !windows
    12  
    13  package runtime
    14  
    15  import "unsafe"
    16  
    17  // read calls the read system call.
    18  // It returns a non-negative number of bytes written or a negative errno value.
    19  func read(fd int32, p unsafe.Pointer, n int32) int32
    20  
    21  func closefd(fd int32) int32
    22  
    23  func exit(code int32)
    24  func usleep(usec uint32)
    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