mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Plumb restore context to load*() methods.
This allows for external information to be passed to restore code.
Similar to c087777e37 ("Plumb restore context to afterLoad()").
Updates #1956.
PiperOrigin-RevId: 614125262
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package netstack
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -24,7 +25,7 @@ func (s *sock) saveTimestamp() int64 {
|
||||
return s.timestamp.UnixNano()
|
||||
}
|
||||
|
||||
func (s *sock) loadTimestamp(nsec int64) {
|
||||
func (s *sock) loadTimestamp(_ context.Context, nsec int64) {
|
||||
s.readMu.Lock()
|
||||
defer s.readMu.Unlock()
|
||||
s.timestamp = time.Unix(0, nsec)
|
||||
|
||||
Reference in New Issue
Block a user