Commit Graph

6 Commits

Author SHA1 Message Date
Ayush Ranjan a9441aea27 [op] Replace syscall package usage with golang.org/x/sys/unix in pkg/.
The syscall package has been deprecated in favor of golang.org/x/sys.

Note that syscall is still used in the following places:
- pkg/sentry/socket/hostinet/stack.go: some netlink related functionalities
  are not yet available in golang.org/x/sys.
- syscall.Stat_t is still used in some places because os.FileInfo.Sys() still
  returns it and not unix.Stat_t.

Updates #214

PiperOrigin-RevId: 360701387
2021-03-03 10:25:58 -08:00
Jamie Liu 8b15effd9e Improve syserror_test.
- It's very difficult to prevent returnErrnoAsError and returnError from being
  optimized out. Instead, replace BenchmarkReturn* with BenchmarkAssign*, which
  store to globalError.

- Compare to a non-nil globalError in BenchmarkCompare* and BenchmarkSwitch*.

New results:
BenchmarkAssignErrno
BenchmarkAssignErrno-12     	1000000000	         0.615 ns/op
BenchmarkAssignError
BenchmarkAssignError-12     	1000000000	         0.626 ns/op
BenchmarkCompareErrno
BenchmarkCompareErrno-12    	1000000000	         0.522 ns/op
BenchmarkCompareError
BenchmarkCompareError-12    	1000000000	         3.54 ns/op
BenchmarkSwitchErrno
BenchmarkSwitchErrno-12     	1000000000	         1.45 ns/op
BenchmarkSwitchError
BenchmarkSwitchError-12     	536315757	        10.9 ns/op

PiperOrigin-RevId: 331875387
2020-09-15 15:59:25 -07:00
Adin Scannell add40fd6ad Update canonical repository.
This can be merged after:
https://github.com/google/gvisor-website/pull/77
  or
https://github.com/google/gvisor-website/pull/78

PiperOrigin-RevId: 253132620
2019-06-13 16:50:15 -07:00
Michael Pratt 4d52a55201 Change copyright notice to "The gVisor Authors"
Based on the guidelines at
https://opensource.google.com/docs/releasing/authors/.

1. $ rg -l "Google LLC" | xargs sed -i 's/Google LLC.*/The gVisor Authors./'
2. Manual fixup of "Google Inc" references.
3. Add AUTHORS file. Authors may request to be added to this file.
4. Point netstack AUTHORS to gVisor AUTHORS. Drop CONTRIBUTORS.

Fixes #209

PiperOrigin-RevId: 245823212
Change-Id: I64530b24ad021a7d683137459cafc510f5ee1de9
2019-04-29 14:26:23 -07:00
Ian Gudger 8fce67af24 Use correct company name in copyright header
PiperOrigin-RevId: 217951017
Change-Id: Ie08bf6987f98467d07457bcf35b5f1ff6e43c035
2018-10-19 16:35:11 -07:00
Googler d02b74a5dc Check in gVisor.
PiperOrigin-RevId: 194583126
Change-Id: Ica1d8821a90f74e7e745962d71801c598c652463
2018-04-28 01:44:26 -04:00