summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2014-09-06 10:07:23 -0700
committerKeith Randall <khr@golang.org>2014-09-06 10:07:23 -0700
commitb837a62ca91b25e3fa78f386ba7bc0101abc4a54 (patch)
tree50255de4d2e6905d7c05d831d0248f235d8b815f /misc
parent6328ea75fe5ca1d744f456a6a88348a4d47e2288 (diff)
downloadgo-b837a62ca91b25e3fa78f386ba7bc0101abc4a54.tar.gz
runtime: get rid of other Go->C calls in test exports.
testSchedLocal* tests need to malloc now because their stack frames are too big to fit on the G0 stack. LGTM=iant R=golang-codereviews, iant, khr CC=golang-codereviews https://codereview.appspot.com/133660043
Diffstat (limited to 'misc')
-rw-r--r--misc/cgo/test/backdoor/runtime.c14
-rw-r--r--misc/cgo/test/backdoor/thunk.s16
2 files changed, 16 insertions, 14 deletions
diff --git a/misc/cgo/test/backdoor/runtime.c b/misc/cgo/test/backdoor/runtime.c
index 7e6b44872..87ee44eb6 100644
--- a/misc/cgo/test/backdoor/runtime.c
+++ b/misc/cgo/test/backdoor/runtime.c
@@ -10,20 +10,6 @@
typedef char bool;
-bool runtime·lockedOSThread(void);
-
-static void
-FLUSH(void*)
-{
-}
-
-void
-·LockedOSThread(bool b)
-{
- b = runtime·lockedOSThread();
- FLUSH(&b);
-}
-
// This is what a cgo-compiled stub declaration looks like.
void
·Issue7695(struct{void *y[8*sizeof(void*)];}p)
diff --git a/misc/cgo/test/backdoor/thunk.s b/misc/cgo/test/backdoor/thunk.s
new file mode 100644
index 000000000..ae735c8a3
--- /dev/null
+++ b/misc/cgo/test/backdoor/thunk.s
@@ -0,0 +1,16 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Assembly to get into package runtime without using exported symbols.
+
+// +build amd64 amd64p32 arm 386
+
+#include "textflag.h"
+
+#ifdef GOARCH_arm
+#define JMP B
+#endif
+
+TEXT ·LockedOSThread(SB),NOSPLIT,$0-0
+ JMP runtime·lockedOSThread(SB)