diff options
| author | Russ Cox <rsc@golang.org> | 2009-10-15 17:46:53 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-10-15 17:46:53 -0700 |
| commit | a86d7c2bd9196ad9c768a4cb52b5434d23f8fe84 (patch) | |
| tree | b18dff11371da4606dfa47c3018e78f62f3b6564 /src/pkg/sync/mutex_test.go | |
| parent | 96c3809cb09820dd80548f1940a35e442c93c65d (diff) | |
| download | golang-a86d7c2bd9196ad9c768a4cb52b5434d23f8fe84.tar.gz | |
publish semacquire and semrelease for use by sync.
more enforcing package boundaries
R=r
DELTA=46 (13 added, 15 deleted, 18 changed)
OCL=35806
CL=35806
Diffstat (limited to 'src/pkg/sync/mutex_test.go')
| -rw-r--r-- | src/pkg/sync/mutex_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pkg/sync/mutex_test.go b/src/pkg/sync/mutex_test.go index 2944a20fb..d7be79fff 100644 --- a/src/pkg/sync/mutex_test.go +++ b/src/pkg/sync/mutex_test.go @@ -7,20 +7,21 @@ package sync_test import ( + "runtime"; . "sync"; "testing"; ) -func HammerSemaphore(s *int32, cdone chan bool) { +func HammerSemaphore(s *uint32, cdone chan bool) { for i := 0; i < 1000; i++ { - Semacquire(s); - Semrelease(s); + runtime.Semacquire(s); + runtime.Semrelease(s); } cdone <- true; } func TestSemaphore(t *testing.T) { - s := new(int32); + s := new(uint32); *s = 1; c := make(chan bool); for i := 0; i < 10; i++ { |
