diff options
author | Russ Cox <rsc@golang.org> | 2009-05-08 15:21:41 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-05-08 15:21:41 -0700 |
commit | 1ea895d9a458c9e4a91993924fcd39ce7f1dcabe (patch) | |
tree | 5b8c80c41b4110b57cef1a0945350c2caf7557e2 /test/ken/chan.go | |
parent | 206ea17d5fe6ad6d6492afe73ec2d72ce399a3fd (diff) | |
download | golang-1ea895d9a458c9e4a91993924fcd39ce7f1dcabe.tar.gz |
move things out of sys into os and runtime
R=r
OCL=28569
CL=28573
Diffstat (limited to 'test/ken/chan.go')
-rw-r--r-- | test/ken/chan.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/ken/chan.go b/test/ken/chan.go index e06d9ab40..d56d77ade 100644 --- a/test/ken/chan.go +++ b/test/ken/chan.go @@ -6,6 +6,8 @@ package main +import "os" +import "runtime" var randx int; @@ -88,7 +90,7 @@ send(c *Chan) nproc++; // total goroutines running for { for r:=nrand(10); r>=0; r-- { - sys.Gosched(); + runtime.Gosched(); } c.sc <- c.sv; if c.send() { @@ -119,7 +121,7 @@ recv(c *Chan) nproc++; // total goroutines running for { for r:=nrand(10); r>=0; r-- { - sys.Gosched(); + runtime.Gosched(); } v = <-c.rc; if c.recv(v) { @@ -148,7 +150,7 @@ sel(r0,r1,r2,r3, s0,s1,s2,s3 *Chan) for { for r:=nrand(5); r>=0; r-- { - sys.Gosched(); + runtime.Gosched(); } select { @@ -270,9 +272,9 @@ test6(c int) func wait() { - sys.Gosched(); + runtime.Gosched(); for nproc != 0 { - sys.Gosched(); + runtime.Gosched(); } } @@ -321,7 +323,7 @@ main() if tots != t || totr != t { print("tots=", tots, " totr=", totr, " sb=", t, "\n"); - sys.Exit(1); + os.Exit(1); } - sys.Exit(0); + os.Exit(0); } |