111
|
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 !windows
|
|
7 // +build !nacl
|
131
|
8 // +build !js
|
|
9 // +build !darwin
|
111
|
10
|
|
11 package runtime
|
|
12
|
|
13 import "unsafe"
|
|
14
|
131
|
15 //go:noescape
|
111
|
16 func read(fd int32, p unsafe.Pointer, n int32) int32
|
|
17 func closefd(fd int32) int32
|
|
18
|
|
19 //extern exit
|
|
20 func exit(code int32)
|
|
21 func usleep(usec uint32)
|
|
22
|
|
23 //go:noescape
|
|
24 func write(fd uintptr, p unsafe.Pointer, n int32) int32
|
|
25
|
|
26 //go:noescape
|
|
27 func open(name *byte, mode, perm int32) int32
|
131
|
28
|
|
29 // exitThread terminates the current thread, writing *wait = 0 when
|
|
30 // the stack is safe to reclaim.
|
|
31 func exitThread(wait *uint32) {
|
|
32 // This is never used by gccgo.
|
|
33 throw("exitThread")
|
|
34 }
|