Black Lives Matter. Support the Equal Justice Initiative.

Source file src/runtime/os_openbsd_arm.go

Documentation: runtime

     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  package runtime
     6  
     7  func checkgoarm() {
     8  	// TODO(minux): FP checks like in os_linux_arm.go.
     9  
    10  	// osinit not called yet, so ncpu not set: must use getncpu directly.
    11  	if getncpu() > 1 && goarm < 7 {
    12  		print("runtime: this system has multiple CPUs and must use\n")
    13  		print("atomic synchronization instructions. Recompile using GOARM=7.\n")
    14  		exit(1)
    15  	}
    16  }
    17  
    18  //go:nosplit
    19  func cputicks() int64 {
    20  	// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand().
    21  	// runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
    22  	return nanotime()
    23  }
    24  

View as plain text