summaryrefslogtreecommitdiffhomepage
path: root/tools/checklocks/annotations.go
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2021-10-18 11:07:11 -0700
committergVisor bot <gvisor-bot@google.com>2021-10-18 11:09:39 -0700
commit4f6cda4d0ed8694a1b09d27a039eb4e57432bc75 (patch)
tree33fce0369425e33bce8a4fd2664b69cc04d8e3ce /tools/checklocks/annotations.go
parentae8f93e555cdce4b8d423342011b1043f1b470a6 (diff)
Support distinction for RWMutex and read-only locks.
Fixes #6590 PiperOrigin-RevId: 404007524
Diffstat (limited to 'tools/checklocks/annotations.go')
-rw-r--r--tools/checklocks/annotations.go17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/checklocks/annotations.go b/tools/checklocks/annotations.go
index 371260980..1f679e5be 100644
--- a/tools/checklocks/annotations.go
+++ b/tools/checklocks/annotations.go
@@ -23,13 +23,16 @@ import (
)
const (
- checkLocksAnnotation = "// +checklocks:"
- checkLocksAcquires = "// +checklocksacquire:"
- checkLocksReleases = "// +checklocksrelease:"
- checkLocksIgnore = "// +checklocksignore"
- checkLocksForce = "// +checklocksforce"
- checkLocksFail = "// +checklocksfail"
- checkAtomicAnnotation = "// +checkatomic"
+ checkLocksAnnotation = "// +checklocks:"
+ checkLocksAnnotationRead = "// +checklocksread:"
+ checkLocksAcquires = "// +checklocksacquire:"
+ checkLocksAcquiresRead = "// +checklocksacquireread:"
+ checkLocksReleases = "// +checklocksrelease:"
+ checkLocksReleasesRead = "// +checklocksreleaseread:"
+ checkLocksIgnore = "// +checklocksignore"
+ checkLocksForce = "// +checklocksforce"
+ checkLocksFail = "// +checklocksfail"
+ checkAtomicAnnotation = "// +checkatomic"
)
// failData indicates an expected failure.