diff options
author | Russ Cox <rsc@golang.org> | 2008-12-19 03:05:37 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2008-12-19 03:05:37 -0800 |
commit | 65e4c6bf1819903c1b751a3b305a6d2ec07cc283 (patch) | |
tree | 183e8cd345f5f895d2cbc36dd8f8be93640303c3 /src/lib/sync/mutex_test.go | |
parent | 89995dcecf37b9a21c26783dcf8ab506da237363 (diff) | |
download | golang-65e4c6bf1819903c1b751a3b305a6d2ec07cc283.tar.gz |
change *map to map; *chan to chan; new(T) to new(*T)
fix bugs left over from *[] to [] conversion.
TBR=r
OCL=21576
CL=21581
Diffstat (limited to 'src/lib/sync/mutex_test.go')
-rw-r--r-- | src/lib/sync/mutex_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/sync/mutex_test.go b/src/lib/sync/mutex_test.go index 7a6dd1814..0fd204c89 100644 --- a/src/lib/sync/mutex_test.go +++ b/src/lib/sync/mutex_test.go @@ -11,7 +11,7 @@ import ( "testing" ) -func HammerSemaphore(s *int32, cdone *chan bool) { +func HammerSemaphore(s *int32, cdone chan bool) { for i := 0; i < 1000; i++ { sys.semacquire(s); sys.semrelease(s); @@ -20,7 +20,7 @@ func HammerSemaphore(s *int32, cdone *chan bool) { } export func TestSemaphore(t *testing.T) { - s := new(int32); + s := new(*int32); *s = 1; c := new(chan bool); for i := 0; i < 10; i++ { @@ -32,7 +32,7 @@ export func TestSemaphore(t *testing.T) { } -func HammerMutex(m *Mutex, cdone *chan bool) { +func HammerMutex(m *Mutex, cdone chan bool) { for i := 0; i < 1000; i++ { m.Lock(); m.Unlock(); @@ -41,7 +41,7 @@ func HammerMutex(m *Mutex, cdone *chan bool) { } export func TestMutex(t *testing.T) { - m := new(Mutex); + m := new(*Mutex); c := new(chan bool); for i := 0; i < 10; i++ { go HammerMutex(m, c); |