diff options
Diffstat (limited to 'src/runtime/lockrank_off.go')
-rw-r--r-- | src/runtime/lockrank_off.go | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/runtime/lockrank_off.go b/src/runtime/lockrank_off.go index 32378a9627..40edf882ee 100644 --- a/src/runtime/lockrank_off.go +++ b/src/runtime/lockrank_off.go @@ -18,29 +18,31 @@ func getLockRank(l *mutex) lockRank { return 0 } -// The following functions may be called in nosplit context. -// Nosplit is not strictly required for lockWithRank, unlockWithRank -// and lockWithRankMayAcquire, but these nosplit annotations must -// be kept consistent with the equivalent functions in lockrank_on.go. - -//go:nosplit func lockWithRank(l *mutex, rank lockRank) { lock2(l) } +// This function may be called in nosplit context and thus must be nosplit. //go:nosplit func acquireLockRank(rank lockRank) { } -//go:nosplit func unlockWithRank(l *mutex) { unlock2(l) } +// This function may be called in nosplit context and thus must be nosplit. //go:nosplit func releaseLockRank(rank lockRank) { } -//go:nosplit func lockWithRankMayAcquire(l *mutex, rank lockRank) { } + +//go:nosplit +func assertLockHeld(l *mutex) { +} + +//go:nosplit +func assertRankHeld(r lockRank) { +} |