summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-11-09 10:53:37 -0800
committergVisor bot <gvisor-bot@google.com>2021-11-09 10:57:11 -0800
commit3f5cfe694a99ebebc8ad7b55090259e1e4319d02 (patch)
tree66b779216a017c34e67a303da59ba944ee68f417 /pkg/tcpip/stack
parent84b38f4c6e065d3f9314a8abbb3f5857ed4fa44e (diff)
Remove Stack.NewJob
Use the static method instead; these methods encourage callers to retain a pointer to the entire stack rather than only its clock which they require. PiperOrigin-RevId: 408651956
Diffstat (limited to 'pkg/tcpip/stack')
-rw-r--r--pkg/tcpip/stack/stack.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/pkg/tcpip/stack/stack.go b/pkg/tcpip/stack/stack.go
index 3ddf9de6b..86fa85f2c 100644
--- a/pkg/tcpip/stack/stack.go
+++ b/pkg/tcpip/stack/stack.go
@@ -419,11 +419,6 @@ func New(opts Options) *Stack {
return s
}
-// newJob returns a tcpip.Job using the Stack clock.
-func (s *Stack) newJob(l sync.Locker, f func()) *tcpip.Job {
- return tcpip.NewJob(s.clock, l, f)
-}
-
// UniqueID returns a unique identifier.
func (s *Stack) UniqueID() uint64 {
return s.uniqueIDGenerator.UniqueID()
@@ -1844,11 +1839,6 @@ func (s *Stack) FindNICNameFromID(id tcpip.NICID) string {
return nic.Name()
}
-// NewJob returns a new tcpip.Job using the stack's clock.
-func (s *Stack) NewJob(l sync.Locker, f func()) *tcpip.Job {
- return tcpip.NewJob(s.clock, l, f)
-}
-
// ParseResult indicates the result of a parsing attempt.
type ParseResult int