aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/sys_arm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/sys_arm.c')
-rw-r--r--src/pkg/runtime/sys_arm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/pkg/runtime/sys_arm.c b/src/pkg/runtime/sys_arm.c
new file mode 100644
index 0000000000..68ea49a557
--- /dev/null
+++ b/src/pkg/runtime/sys_arm.c
@@ -0,0 +1,17 @@
+// Copyright 2013 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.
+
+#include "runtime.h"
+
+// adjust Gobuf as if it executed a call to fn with context ctxt
+// and then did an immediate Gosave.
+void
+runtime·gostartcall(Gobuf *gobuf, void (*fn)(void), void *ctxt)
+{
+ if(gobuf->lr != 0)
+ runtime·throw("invalid use of gostartcall");
+ gobuf->lr = gobuf->pc;
+ gobuf->pc = (uintptr)fn;
+ gobuf->ctxt = ctxt;
+}