Fix a few typos

This commit is contained in:
Andrei Vagin
2025-01-29 21:16:51 -08:00
parent 8bdf76c5ca
commit f010ae01ac
116 changed files with 189 additions and 182 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ type foo struct {
}
```
These semantics are enforcable on `sync.Mutex`, `sync.RWMutex` and `sync.Locker`
These semantics are enforceable on `sync.Mutex`, `sync.RWMutex` and `sync.Locker`
fields. Semantics with respect to reading and writing are automatically detected
and enforced. If an access is read-only, then the lock need only be held as a
read lock, in the case of an `sync.RWMutex`.
@@ -142,7 +142,7 @@ func foo(ts *testStruct) {
}
```
This pattern often applies to defer usage, which allows defered functions to be
This pattern often applies to defer usage, which allows deferred functions to be
fully analyzed with the lock state at time of execution.
However, if a closure is passed to another function, the anonymous function
+1 -1
View File
@@ -298,7 +298,7 @@ func (pc *passContext) checkGuards(inst almostInst, from ssa.Value, accessObj ty
for s, info := range ls.lockedMutexes {
// Is this an object for which we have facts? If there
// is no ability to name this object, then we don't
// bother with any inferrence. We also ignore any self
// bother with any inference. We also ignore any self
// references (e.g. accessing a mutex while you are
// holding that exact mutex).
if info.object == nil || accessObj == info.object {
+1 -1
View File
@@ -247,7 +247,7 @@ type elemType interface {
func (l *lockState) valueAndObject(v ssa.Value) (string, types.Object) {
switch x := v.(type) {
case *ssa.Parameter:
// Was this provided as a paramter for a local anonymous
// Was this provided as a parameter for a local anonymous
// function invocation?
v, ok := l.stored[x]
if ok {
+1 -1
View File
@@ -18,7 +18,7 @@ import (
"sync"
)
// badFieldsStruct verifies that refering invalid fields fails.
// badFieldsStruct verifies that referring invalid fields fails.
type badFieldsStruct struct {
// +checklocks:mu
x int // +checklocksfail