summaryrefslogtreecommitdiff
path: root/src/lib/sync/mutex_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-01-16 14:58:14 -0800
committerRuss Cox <rsc@golang.org>2009-01-16 14:58:14 -0800
commitc000d2eb1c11999b15772ad582b364604f6f8acf (patch)
tree321251a8cd180ad7856af54e8e531850d0735fb0 /src/lib/sync/mutex_test.go
parent969365a06e210a3a3c969a99585e868aecc6af8a (diff)
downloadgolang-c000d2eb1c11999b15772ad582b364604f6f8acf.tar.gz
casify, cleanup sys
R=r OCL=22978 CL=22984
Diffstat (limited to 'src/lib/sync/mutex_test.go')
-rw-r--r--src/lib/sync/mutex_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/sync/mutex_test.go b/src/lib/sync/mutex_test.go
index 1c4e73056..b9c063dbc 100644
--- a/src/lib/sync/mutex_test.go
+++ b/src/lib/sync/mutex_test.go
@@ -11,10 +11,10 @@ import (
"testing"
)
-func hammerSemaphore(s *int32, cdone chan bool) {
+export func HammerSemaphore(s *int32, cdone chan bool) {
for i := 0; i < 1000; i++ {
- sys.semacquire(s);
- sys.semrelease(s);
+ semacquire(s);
+ semrelease(s);
}
cdone <- true;
}
@@ -24,7 +24,7 @@ export func TestSemaphore(t *testing.T) {
*s = 1;
c := make(chan bool);
for i := 0; i < 10; i++ {
- go hammerSemaphore(s, c);
+ go HammerSemaphore(s, c);
}
for i := 0; i < 10; i++ {
<-c;
@@ -32,7 +32,7 @@ export func TestSemaphore(t *testing.T) {
}
-func hammerMutex(m *Mutex, cdone chan bool) {
+export func HammerMutex(m *Mutex, cdone chan bool) {
for i := 0; i < 1000; i++ {
m.Lock();
m.Unlock();
@@ -44,7 +44,7 @@ export func TestMutex(t *testing.T) {
m := new(Mutex);
c := make(chan bool);
for i := 0; i < 10; i++ {
- go hammerMutex(m, c);
+ go HammerMutex(m, c);
}
for i := 0; i < 10; i++ {
<-c;