github.com/razvanm/vanadium-go-1.3@v0.0.0-20160721203343-4a65068e5915/src/runtime/os_netbsd_arm.c (about) 1 // Copyright 2013 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 #include "runtime.h" 6 #include "defs_GOOS_GOARCH.h" 7 #include "os_GOOS.h" 8 #include "signal_GOOS_GOARCH.h" 9 #include "textflag.h" 10 11 void 12 runtime·lwp_mcontext_init(McontextT *mc, void *stack, M *mp, G *gp, void (*fn)(void)) 13 { 14 mc->__gregs[REG_R15] = (uint32)runtime·lwp_tramp; 15 mc->__gregs[REG_R13] = (uint32)stack; 16 mc->__gregs[REG_R0] = (uint32)mp; 17 mc->__gregs[REG_R1] = (uint32)gp; 18 mc->__gregs[REG_R2] = (uint32)fn; 19 } 20 21 void 22 runtime·checkgoarm(void) 23 { 24 // TODO(minux) 25 } 26 27 #pragma textflag NOSPLIT 28 int64 29 runtime·cputicks() { 30 // Currently cputicks() is used in blocking profiler and to seed runtime·fastrand1(). 31 // runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler. 32 // TODO: need more entropy to better seed fastrand1. 33 return runtime·nanotime(); 34 }