Debian Codegraph @

libgo/go/runtime/stubs2.go

raw
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 !js && !plan9 && !windows
6
7 package runtime
8
9 import "unsafe"
10
11 // read calls the read system call.
12 // It returns a non-negative number of bytes written or a negative errno value.
13 //go:noescape
14 func read(fd int32, p unsafe.Pointer, n int32) int32
15
16 func closefd(fd int32) int32
17
18 //extern-sysinfo exit
19 func exit(code int32)
20 func usleep(usec uint32)
21
22 //go:nosplit
23 func usleep_no_g(usec uint32) {
24 usleep(usec)
25 }
26
27 // write calls the write system call.
28 // It returns a non-negative number of bytes written or a negative errno value.
29 //go:noescape
30 func write1(fd uintptr, p unsafe.Pointer, n int32) int32
31
32 //go:noescape
33 func open(name *byte, mode, perm int32) int32
34
35 // exitThread terminates the current thread, writing *wait = 0 when
36 // the stack is safe to reclaim.
37 func exitThread(wait *uint32) {
38 // This is never used by gccgo.
39 throw("exitThread")
40 }
41
42 // So that the C initialization code can call osinit.
43 //go:linkname osinit runtime.osinit