diff options
author | Zach Koopmans <zkoopmans@google.com> | 2021-08-13 17:14:36 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-08-13 17:16:52 -0700 |
commit | ce58d71fd526587c0ed5e898e3a680c30c02c6d2 (patch) | |
tree | 831dce518d66ba8acd53afa7f45b7b7577218b3d /pkg/amutex | |
parent | 868ed0e807239635bd3aa6b964bb4fc0913916be (diff) |
[syserror] Remove pkg syserror.
Removes package syserror and moves still relevant code to either linuxerr
or to syserr (to be later removed).
Internal errors are converted from random types to *errors.Error types used
in linuxerr. Internal errors are in linuxerr/internal.go.
PiperOrigin-RevId: 390724202
Diffstat (limited to 'pkg/amutex')
-rw-r--r-- | pkg/amutex/BUILD | 2 | ||||
-rw-r--r-- | pkg/amutex/amutex.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/amutex/BUILD b/pkg/amutex/BUILD index bd3a5cce9..6d8b5f818 100644 --- a/pkg/amutex/BUILD +++ b/pkg/amutex/BUILD @@ -8,7 +8,7 @@ go_library( visibility = ["//:sandbox"], deps = [ "//pkg/context", - "//pkg/syserror", + "//pkg/errors/linuxerr", ], ) diff --git a/pkg/amutex/amutex.go b/pkg/amutex/amutex.go index d7acc1d9f..985199cfa 100644 --- a/pkg/amutex/amutex.go +++ b/pkg/amutex/amutex.go @@ -20,7 +20,7 @@ import ( "sync/atomic" "gvisor.dev/gvisor/pkg/context" - "gvisor.dev/gvisor/pkg/syserror" + "gvisor.dev/gvisor/pkg/errors/linuxerr" ) // Sleeper must be implemented by users of the abortable mutex to allow for @@ -33,7 +33,7 @@ type NoopSleeper = context.Context // Block blocks until either receiving from ch succeeds (in which case it // returns nil) or sleeper is interrupted (in which case it returns -// syserror.ErrInterrupted). +// linuxerr.ErrInterrupted). func Block(sleeper Sleeper, ch <-chan struct{}) error { cancel := sleeper.SleepStart() select { @@ -42,7 +42,7 @@ func Block(sleeper Sleeper, ch <-chan struct{}) error { return nil case <-cancel: sleeper.SleepFinish(false) - return syserror.ErrInterrupted + return linuxerr.ErrInterrupted } } |