...

Source file src/runtime/race0.go

Documentation: 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  //go:build !race
		 6  // +build !race
		 7  
		 8  // Dummy race detection API, used when not built with -race.
		 9  
		10  package runtime
		11  
		12  import (
		13  	"unsafe"
		14  )
		15  
		16  const raceenabled = false
		17  
		18  // Because raceenabled is false, none of these functions should be called.
		19  
		20  func raceReadObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr)	{ throw("race") }
		21  func raceWriteObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr) { throw("race") }
		22  func raceinit() (uintptr, uintptr)																					{ throw("race"); return 0, 0 }
		23  func racefini()																														 { throw("race") }
		24  func raceproccreate() uintptr																							 { throw("race"); return 0 }
		25  func raceprocdestroy(ctx uintptr)																					 { throw("race") }
		26  func racemapshadow(addr unsafe.Pointer, size uintptr)											 { throw("race") }
		27  func racewritepc(addr unsafe.Pointer, callerpc, pc uintptr)								 { throw("race") }
		28  func racereadpc(addr unsafe.Pointer, callerpc, pc uintptr)									{ throw("race") }
		29  func racereadrangepc(addr unsafe.Pointer, sz, callerpc, pc uintptr)				 { throw("race") }
		30  func racewriterangepc(addr unsafe.Pointer, sz, callerpc, pc uintptr)				{ throw("race") }
		31  func raceacquire(addr unsafe.Pointer)																			 { throw("race") }
		32  func raceacquireg(gp *g, addr unsafe.Pointer)															 { throw("race") }
		33  func raceacquirectx(racectx uintptr, addr unsafe.Pointer)									 { throw("race") }
		34  func racerelease(addr unsafe.Pointer)																			 { throw("race") }
		35  func racereleaseg(gp *g, addr unsafe.Pointer)															 { throw("race") }
		36  func racereleaseacquire(addr unsafe.Pointer)																{ throw("race") }
		37  func racereleaseacquireg(gp *g, addr unsafe.Pointer)												{ throw("race") }
		38  func racereleasemerge(addr unsafe.Pointer)																	{ throw("race") }
		39  func racereleasemergeg(gp *g, addr unsafe.Pointer)													{ throw("race") }
		40  func racefingo()																														{ throw("race") }
		41  func racemalloc(p unsafe.Pointer, sz uintptr)															 { throw("race") }
		42  func racefree(p unsafe.Pointer, sz uintptr)																 { throw("race") }
		43  func racegostart(pc uintptr) uintptr																				{ throw("race"); return 0 }
		44  func racegoend()																														{ throw("race") }
		45  func racectxend(racectx uintptr)																						{ throw("race") }
		46  

View as plain text