aboutsummaryrefslogtreecommitdiff
path: root/misc/cgo/testcarchive/testdata/libgo2/libgo2.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/testcarchive/testdata/libgo2/libgo2.go')
-rw-r--r--misc/cgo/testcarchive/testdata/libgo2/libgo2.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/cgo/testcarchive/testdata/libgo2/libgo2.go b/misc/cgo/testcarchive/testdata/libgo2/libgo2.go
index 35c89ae92b..b2e7731a45 100644
--- a/misc/cgo/testcarchive/testdata/libgo2/libgo2.go
+++ b/misc/cgo/testcarchive/testdata/libgo2/libgo2.go
@@ -39,6 +39,7 @@ import (
// RunGoroutines starts some goroutines that don't do anything.
// The idea is to get some threads going, so that a signal will be delivered
// to a thread started by Go.
+//
//export RunGoroutines
func RunGoroutines() {
for i := 0; i < 4; i++ {
@@ -50,6 +51,7 @@ func RunGoroutines() {
}
// Block blocks the current thread while running Go code.
+//
//export Block
func Block() {
select {}
@@ -58,6 +60,7 @@ func Block() {
var P *byte
// TestSEGV makes sure that an invalid address turns into a run-time Go panic.
+//
//export TestSEGV
func TestSEGV() {
defer func() {
@@ -72,11 +75,13 @@ func TestSEGV() {
}
// Noop ensures that the Go runtime is initialized.
+//
//export Noop
func Noop() {
}
// Raise SIGPIPE.
+//
//export GoRaiseSIGPIPE
func GoRaiseSIGPIPE() {
C.CRaiseSIGPIPE()