Source file src/runtime/os_openbsd_arm.go

     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 numCPUStartup not set: must use
    11  	// getCPUCount directly.
    12  	if getCPUCount() > 1 && goarm < 7 {
    13  		print("runtime: this system has multiple CPUs and must use\n")
    14  		print("atomic synchronization instructions. Recompile using GOARM=7.\n")
    15  		exit(1)
    16  	}
    17  }
    18  
    19  //go:nosplit
    20  func cputicks() int64 {
    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