mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix a few typos
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user