Home | History | Annotate | Download | only in runtime
      1 // Copyright 2014 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 package runtime
      6 
      7 func checkgoarm() {
      8 	// TODO(minux): FP checks like in os_linux_arm.go.
      9 
     10 	// NaCl/ARM only supports ARMv7
     11 	if goarm != 7 {
     12 		print("runtime: NaCl requires ARMv7. Recompile using GOARM=7.\n")
     13 		exit(1)
     14 	}
     15 }
     16 
     17 //go:nosplit
     18 func cputicks() int64 {
     19 	// Currently cputicks() is used in blocking profiler and to seed runtimefastrand().
     20 	// runtimenanotime() is a poor approximation of CPU ticks that is enough for the profiler.
     21 	// TODO: need more entropy to better seed fastrand.
     22 	return nanotime()
     23 }
     24