...

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

View as plain text