...
Run Format

Source file src/runtime/os_freebsd_arm.go

Documentation: runtime

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

View as plain text