diff options
Diffstat (limited to 'src/sync')
| -rw-r--r-- | src/sync/atomic/asm_arm.s | 2 | ||||
| -rw-r--r-- | src/sync/atomic/atomic_test.go | 2 | ||||
| -rw-r--r-- | src/sync/cond.go | 6 | ||||
| -rw-r--r-- | src/sync/mutex.go | 4 | ||||
| -rw-r--r-- | src/sync/once.go | 4 | ||||
| -rw-r--r-- | src/sync/rwmutex.go | 4 | ||||
| -rw-r--r-- | src/sync/waitgroup.go | 4 |
7 files changed, 13 insertions, 13 deletions
diff --git a/src/sync/atomic/asm_arm.s b/src/sync/atomic/asm_arm.s index 6cdc8fbc36..d35ea2a4e0 100644 --- a/src/sync/atomic/asm_arm.s +++ b/src/sync/atomic/asm_arm.s @@ -208,7 +208,7 @@ loop: ok: RET -// Fast, cached version of check. No frame, just MOVW CMP RET after first time. +// Fast, cached version of check. No frame, just MOVW CMP RET after first time. TEXT fastCheck64<>(SB),NOSPLIT,$-4 MOVW ok64<>(SB), R0 CMP $0, R0 // have we been here before? diff --git a/src/sync/atomic/atomic_test.go b/src/sync/atomic/atomic_test.go index 23650abae9..deb3ccb55b 100644 --- a/src/sync/atomic/atomic_test.go +++ b/src/sync/atomic/atomic_test.go @@ -747,7 +747,7 @@ func TestStorePointer(t *testing.T) { // (Is the function atomic?) // // For each function, we write a "hammer" function that repeatedly -// uses the atomic operation to add 1 to a value. After running +// uses the atomic operation to add 1 to a value. After running // multiple hammers in parallel, check that we end with the correct // total. // Swap can't add 1, so it uses a different scheme. diff --git a/src/sync/cond.go b/src/sync/cond.go index 0aefcda908..273884767f 100644 --- a/src/sync/cond.go +++ b/src/sync/cond.go @@ -35,13 +35,13 @@ func NewCond(l Locker) *Cond { } // Wait atomically unlocks c.L and suspends execution -// of the calling goroutine. After later resuming execution, -// Wait locks c.L before returning. Unlike in other systems, +// of the calling goroutine. After later resuming execution, +// Wait locks c.L before returning. Unlike in other systems, // Wait cannot return unless awoken by Broadcast or Signal. // // Because c.L is not locked when Wait first resumes, the caller // typically cannot assume that the condition is true when -// Wait returns. Instead, the caller should Wait in a loop: +// Wait returns. Instead, the caller should Wait in a loop: // // c.L.Lock() // for !condition() { diff --git a/src/sync/mutex.go b/src/sync/mutex.go index eb526144c5..78b115cf5a 100644 --- a/src/sync/mutex.go +++ b/src/sync/mutex.go @@ -3,8 +3,8 @@ // license that can be found in the LICENSE file. // Package sync provides basic synchronization primitives such as mutual -// exclusion locks. Other than the Once and WaitGroup types, most are intended -// for use by low-level library routines. Higher-level synchronization is +// exclusion locks. Other than the Once and WaitGroup types, most are intended +// for use by low-level library routines. Higher-level synchronization is // better done via channels and communication. // // Values containing the types defined in this package should not be copied. diff --git a/src/sync/once.go b/src/sync/once.go index 10b42fddc2..d8ef952ea5 100644 --- a/src/sync/once.go +++ b/src/sync/once.go @@ -18,10 +18,10 @@ type Once struct { // first time for this instance of Once. In other words, given // var once Once // if once.Do(f) is called multiple times, only the first call will invoke f, -// even if f has a different value in each invocation. A new instance of +// even if f has a different value in each invocation. A new instance of // Once is required for each function to execute. // -// Do is intended for initialization that must be run exactly once. Since f +// Do is intended for initialization that must be run exactly once. Since f // is niladic, it may be necessary to use a function literal to capture the // arguments to a function to be invoked by Do: // config.once.Do(func() { config.init(filename) }) diff --git a/src/sync/rwmutex.go b/src/sync/rwmutex.go index d438c93c88..9fc6e3bd2c 100644 --- a/src/sync/rwmutex.go +++ b/src/sync/rwmutex.go @@ -94,11 +94,11 @@ func (rw *RWMutex) Lock() { } } -// Unlock unlocks rw for writing. It is a run-time error if rw is +// Unlock unlocks rw for writing. It is a run-time error if rw is // not locked for writing on entry to Unlock. // // As with Mutexes, a locked RWMutex is not associated with a particular -// goroutine. One goroutine may RLock (Lock) an RWMutex and then +// goroutine. One goroutine may RLock (Lock) an RWMutex and then // arrange for another goroutine to RUnlock (Unlock) it. func (rw *RWMutex) Unlock() { if race.Enabled { diff --git a/src/sync/waitgroup.go b/src/sync/waitgroup.go index c77fec306c..029e6077cd 100644 --- a/src/sync/waitgroup.go +++ b/src/sync/waitgroup.go @@ -12,8 +12,8 @@ import ( // A WaitGroup waits for a collection of goroutines to finish. // The main goroutine calls Add to set the number of -// goroutines to wait for. Then each of the goroutines -// runs and calls Done when finished. At the same time, +// goroutines to wait for. Then each of the goroutines +// runs and calls Done when finished. At the same time, // Wait can be used to block until all goroutines have finished. type WaitGroup struct { // 64-bit value: high 32 bits are counter, low 32 bits are waiter count. |
