[zxwait] Remove non-context functions
Change-Id: I0a3af91881d1c3ff4ce32dafe0b4b71cb1547457
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/go/+/554624
Fuchsia-Auto-Submit: Tamir Duberstein <tamird@google.com>
Reviewed-by: Bruno Dal Bo <brunodalbo@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
diff --git a/src/syscall/zx/zxwait/zxwait.go b/src/syscall/zx/zxwait/zxwait.go
index 030da11..13f52f9 100644
--- a/src/syscall/zx/zxwait/zxwait.go
+++ b/src/syscall/zx/zxwait/zxwait.go
@@ -22,36 +22,12 @@
_ "unsafe" // for go:linkname
)
-// Wait waits for signals on handle.
-//
-// The goroutine that calls Wait is parked until a signal is observed or the
-// handle is closed. No OS thread is tied up while Wait is blocked.
-//
-// Semantically it is equivalent to calling the WaitOne method on a zx.Handle.
-// However it is not implemented with zx_object_wait_one, instead it uses
-// zx_object_wait_async and a port to wait for signals.
-func Wait(handle zx.Handle, signals zx.Signals, timeout zx.Time) (zx.Signals, error) {
- // TODO: support finite timeouts.
- if timeout != zx.TimensecInfinite {
- var observed zx.Signals
- if status := zx.Sys_object_wait_one(handle, signals, timeout, &observed); status != zx.ErrOk {
- return observed, &zx.Error{Status: status, Text: "zxwait.Wait"}
- }
- return observed, nil
- }
- return WaitContext(context.Background(), handle, signals)
-}
-
// WaitContext waits for signals on handle.
func WaitContext(ctx context.Context, handle zx.Handle, signals zx.Signals) (zx.Signals, error) {
sysWaiterOnce.Do(sysWaiterInit)
return sysWaiter.Wait(ctx, handle, signals)
}
-func WithRetry(fn func() error, handle zx.Handle, ready, closed zx.Signals) error {
- return WithRetryContext(context.Background(), fn, handle, ready, closed)
-}
-
func WithRetryContext(ctx context.Context, fn func() error, handle zx.Handle, ready, closed zx.Signals) error {
signals := ready | closed
for {