1
0
mirror of https://github.com/golang/go synced 2024-10-04 16:11:21 -06:00
go/src/pkg/runtime/sys_arm.c

18 lines
497 B
C
Raw Normal View History

// 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;
}