annotate libgo/go/runtime/stubs2.go @ 136:4627f235cf2a

fix c-next example
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 08 Nov 2018 14:11:56 +0900
parents 84e7813d76e9
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // Copyright 2014 The Go Authors. All rights reserved.
kono
parents:
diff changeset
2 // Use of this source code is governed by a BSD-style
kono
parents:
diff changeset
3 // license that can be found in the LICENSE file.
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 // +build !plan9
kono
parents:
diff changeset
6 // +build !windows
kono
parents:
diff changeset
7 // +build !nacl
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
8 // +build !js
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
9 // +build !darwin
111
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 package runtime
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 import "unsafe"
kono
parents:
diff changeset
14
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
15 //go:noescape
111
kono
parents:
diff changeset
16 func read(fd int32, p unsafe.Pointer, n int32) int32
kono
parents:
diff changeset
17 func closefd(fd int32) int32
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 //extern exit
kono
parents:
diff changeset
20 func exit(code int32)
kono
parents:
diff changeset
21 func usleep(usec uint32)
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 //go:noescape
kono
parents:
diff changeset
24 func write(fd uintptr, p unsafe.Pointer, n int32) int32
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 //go:noescape
kono
parents:
diff changeset
27 func open(name *byte, mode, perm int32) int32
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
28
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
29 // exitThread terminates the current thread, writing *wait = 0 when
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
30 // the stack is safe to reclaim.
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
31 func exitThread(wait *uint32) {
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
32 // This is never used by gccgo.
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
33 throw("exitThread")
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
34 }