...

Source file src/runtime/lockrank_off.go

Documentation: runtime

		 1  // Copyright 2020 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 !goexperiment.staticlockranking
		 6  // +build !goexperiment.staticlockranking
		 7  
		 8  package runtime
		 9  
		10  // // lockRankStruct is embedded in mutex, but is empty when staticklockranking is
		11  // disabled (the default)
		12  type lockRankStruct struct {
		13  }
		14  
		15  func lockInit(l *mutex, rank lockRank) {
		16  }
		17  
		18  func getLockRank(l *mutex) lockRank {
		19  	return 0
		20  }
		21  
		22  func lockWithRank(l *mutex, rank lockRank) {
		23  	lock2(l)
		24  }
		25  
		26  // This function may be called in nosplit context and thus must be nosplit.
		27  //go:nosplit
		28  func acquireLockRank(rank lockRank) {
		29  }
		30  
		31  func unlockWithRank(l *mutex) {
		32  	unlock2(l)
		33  }
		34  
		35  // This function may be called in nosplit context and thus must be nosplit.
		36  //go:nosplit
		37  func releaseLockRank(rank lockRank) {
		38  }
		39  
		40  func lockWithRankMayAcquire(l *mutex, rank lockRank) {
		41  }
		42  
		43  //go:nosplit
		44  func assertLockHeld(l *mutex) {
		45  }
		46  
		47  //go:nosplit
		48  func assertRankHeld(r lockRank) {
		49  }
		50  
		51  //go:nosplit
		52  func worldStopped() {
		53  }
		54  
		55  //go:nosplit
		56  func worldStarted() {
		57  }
		58  
		59  //go:nosplit
		60  func assertWorldStopped() {
		61  }
		62  
		63  //go:nosplit
		64  func assertWorldStoppedOrLockHeld(l *mutex) {
		65  }
		66  

View as plain text