...
Source file src/runtime/os_netbsd_arm.go
1
2
3
4
5 package runtime
6
7 import "unsafe"
8
9 func lwp_mcontext_init(mc *mcontextt, stk unsafe.Pointer, mp *m, gp *g, fn uintptr) {
10
11 mc.__gregs[_REG_R15] = uint32(funcPC(lwp_tramp))
12 mc.__gregs[_REG_R13] = uint32(uintptr(stk))
13 mc.__gregs[_REG_R0] = uint32(uintptr(unsafe.Pointer(mp)))
14 mc.__gregs[_REG_R1] = uint32(uintptr(unsafe.Pointer(gp)))
15 mc.__gregs[_REG_R2] = uint32(fn)
16 }
17
18 func checkgoarm() {
19
20
21
22 if getncpu() > 1 && goarm < 7 {
23 print("runtime: this system has multiple CPUs and must use\n")
24 print("atomic synchronization instructions. Recompile using GOARM=7.\n")
25 exit(1)
26 }
27 }
28
29
30 func cputicks() int64 {
31
32
33
34 return nanotime()
35 }
36
View as plain text