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 | 5bbd4c2f1b9e45ebbdef29695d848a062b312fc7 (patch) | |
| tree | b18dff11371da4606dfa47c3018e78f62f3b6564 /src/pkg/runtime/extern.go | |
| parent | 2c029dedfc2c07ea2250c492a186e1cb8cfa6533 (diff) | |
| download | go-5bbd4c2f1b9e45ebbdef29695d848a062b312fc7.tar.xz | |
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/runtime/extern.go')
| -rw-r--r-- | src/pkg/runtime/extern.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pkg/runtime/extern.go b/src/pkg/runtime/extern.go index 131767aef1..70c6f434be 100644 --- a/src/pkg/runtime/extern.go +++ b/src/pkg/runtime/extern.go @@ -46,3 +46,14 @@ func GOMAXPROCS(n int) // Cgocalls returns the number of cgo calls made by the current process. func Cgocalls() int64 + +// Semacquire waits until *s > 0 and then atomically decrements it. +// It is intended as a simple sleep primitive for use by the synchronization +// library and should not be used directly. +func Semacquire(s *uint32) + +// Semrelease atomically increments *s and notifies a waiting goroutine +// if one is blocked in Semacquire. +// It is intended as a simple wakeup primitive for use by the synchronization +// library and should not be used directly. +func Semrelease(s *uint32) |
