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