Fix various spelling issues in the documentation

Addresses obvious typos, in the documentation only.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/gvisor/pull/443 from Pixep:fix/documentation-spelling 4d0688164eafaf0b3010e5f4824b35d1e7176d65
PiperOrigin-RevId: 255477779
This commit is contained in:
Michael Pratt
2019-06-27 14:25:50 -07:00
committed by gVisor bot
parent 085a907565
commit 5b41ba5d0e
72 changed files with 90 additions and 90 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# Package linux contains the constants and types needed to inferface with a
# Package linux contains the constants and types needed to interface with a
# Linux kernel. It should be used instead of syscall or golang.org/x/sys/unix
# when the host OS may not be Linux.
+1 -1
View File
@@ -14,7 +14,7 @@
package linux
// Comands from linux/fcntl.h.
// Commands from linux/fcntl.h.
const (
F_DUPFD = 0
F_GETFD = 1
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// Package linux contains the constants and types needed to inferface with a Linux kernel.
// Package linux contains the constants and types needed to interface with a Linux kernel.
package linux
// NumSoftIRQ is the number of software IRQs, exposed via /proc/stat.
+2 -2
View File
@@ -21,13 +21,13 @@ import (
)
// Sleeper must be implemented by users of the abortable mutex to allow for
// cancelation of waits.
// cancellation of waits.
type Sleeper interface {
// SleepStart is called by the AbortableMutex.Lock() function when the
// mutex is contended and the goroutine is about to sleep.
//
// A channel can be returned that causes the sleep to be canceled if
// it's readable. If no cancelation is desired, nil can be returned.
// it's readable. If no cancellation is desired, nil can be returned.
SleepStart() <-chan struct{}
// SleepFinish is called by AbortableMutex.Lock() once a contended mutex
+1 -1
View File
@@ -47,7 +47,7 @@ func TestMutualExclusion(t *testing.T) {
// goroutines ran concurrently within the critical section.
//
// If one of the goroutines doesn't complete, it's likely a bug that
// causes to to wait forever.
// causes it to wait forever.
const gr = 1000
const iters = 100000
v := 0
+1 -1
View File
@@ -620,7 +620,7 @@ func vendorIDFromRegs(bx, cx, dx uint32) string {
// state includes floating point registers, and other cpu state that's not
// associated with the normal task context.
//
// Note: We can save some space here with an optimiazation where we use a
// Note: We can save some space here with an optimization where we use a
// smaller chunk of memory depending on features that are actually enabled.
// Currently we just use the largest possible size for simplicity (which is
// about 2.5K worst case, with avx512).
+1 -1
View File
@@ -144,7 +144,7 @@ type debugEmitter struct {
inner Emitter
}
// DebugEmitterFrom creates a new event channel emitter by wraping an existing
// DebugEmitterFrom creates a new event channel emitter by wrapping an existing
// raw emitter.
func DebugEmitterFrom(inner Emitter) Emitter {
return &debugEmitter{
+2 -2
View File
@@ -167,7 +167,7 @@ func NewFromFile(file *os.File) (*FD, error) {
return New(fd), nil
}
// Open is equivallent to open(2).
// Open is equivalent to open(2).
func Open(path string, openmode int, perm uint32) (*FD, error) {
f, err := syscall.Open(path, openmode|syscall.O_LARGEFILE, perm)
if err != nil {
@@ -176,7 +176,7 @@ func Open(path string, openmode int, perm uint32) (*FD, error) {
return New(f), nil
}
// OpenAt is equivallent to openat(2).
// OpenAt is equivalent to openat(2).
func OpenAt(dir *FD, path string, flags int, mode uint32) (*FD, error) {
f, err := syscall.Openat(dir.FD(), path, flags, mode)
if err != nil {
+1 -1
View File
@@ -222,7 +222,7 @@ var logMu sync.Mutex
// log is the default logger.
var log atomic.Value
// Log retieves the global logger.
// Log retrieves the global logger.
func Log() *BasicLogger {
return log.Load().(*BasicLogger)
}
+1 -1
View File
@@ -92,7 +92,7 @@ func (o OpenFlags) String() string {
}
}
// Tag is a messsage tag.
// Tag is a message tag.
type Tag uint16
// FID is a file identifier.
+1 -1
View File
@@ -389,7 +389,7 @@ func checkDeleted(h *Harness, file p9.File) {
_, newFile, err := file.Walk(nil)
if err == syscall.EBUSY {
// We can't walk from here because this reference is open
// aleady. Okay, we will also have unopened cases through
// already. Okay, we will also have unopened cases through
// TestUnlink, just skip the remove operation for now.
return
} else if err != nil {
+1 -1
View File
@@ -244,7 +244,7 @@ func addSyscallArgsCheck(p *bpf.ProgramBuilder, rules []Rule, action linux.BPFAc
return nil
}
// buildBSTProgram converts a binary tree started in 'root' into BPF code. The ouline of the code
// buildBSTProgram converts a binary tree started in 'root' into BPF code. The outline of the code
// is as follows:
//
// // SYS_PIPE(22), root
+1 -1
View File
@@ -1288,7 +1288,7 @@ func (s *Set) String() string {
return s.root.String()
}
// String stringifes a node (and all of its children) for debugging.
// String stringifies a node (and all of its children) for debugging.
func (n *node) String() string {
var buf bytes.Buffer
n.writeDebugString(&buf, "")
+2 -2
View File
@@ -126,7 +126,7 @@ A mount point is restored in two steps:
- Second, during state.Load, each `fs.MountedFilesystem` optionally searches
for a mount in the `fs.RestoreEnvironment` that matches its saved device
name. The `fs.MountedFilesystem` then restablishes a pointer to the root of
name. The `fs.MountedFilesystem` then reestablishes a pointer to the root of
the mounted filesystem. For example, the mount specification provides the
network connection for a mounted remote filesystem client to communicate
with its remote file server. The `fs.MountedFilesystem` also trivially loads
@@ -158,7 +158,7 @@ Otherwise an `fs.File` restores flags, an offset, and a unique identifier (only
used internally).
It may use the `fs.Inode`, which it indirectly holds a reference on through the
`fs.Dirent`, to restablish an open file handle on the backing filesystem (e.g.
`fs.Dirent`, to reestablish an open file handle on the backing filesystem (e.g.
to continue reading and writing).
## Overlay
+1 -1
View File
@@ -44,7 +44,7 @@ type Device struct {
var _ fs.InodeOperations = (*Device)(nil)
// NewDevice creates and intializes a Device structure.
// NewDevice creates and initializes a Device structure.
func NewDevice(ctx context.Context, owner fs.FileOwner, fp fs.FilePermissions) *Device {
return &Device{
InodeSimpleAttributes: fsutil.NewInodeSimpleAttributes(ctx, owner, fp, linux.ANON_INODE_FS_MAGIC),
+1 -1
View File
@@ -61,7 +61,7 @@ type Device struct {
var _ fs.InodeOperations = (*Device)(nil)
// NewDevice creates and intializes a Device structure.
// NewDevice creates and initializes a Device structure.
func NewDevice(ctx context.Context, owner fs.FileOwner, fp fs.FilePermissions) *Device {
return &Device{
InodeSimpleAttributes: fsutil.NewInodeSimpleAttributes(ctx, owner, fp, 0),
+1 -1
View File
@@ -39,7 +39,7 @@ func init() {
fs.RegisterFilesystem(&filesystem{})
}
// FilesystemName is the name underwhich the filesystem is registered.
// FilesystemName is the name under which the filesystem is registered.
// Name matches drivers/base/devtmpfs.c:dev_fs_type.name.
const FilesystemName = "devtmpfs"
+2 -2
View File
@@ -146,7 +146,7 @@ func (c *DirentCache) contains(d *Dirent) bool {
return c.list.Front() == d
}
// Invalidate removes all Dirents from the cache, caling DecRef on each.
// Invalidate removes all Dirents from the cache, calling DecRef on each.
func (c *DirentCache) Invalidate() {
if c == nil {
return
@@ -159,7 +159,7 @@ func (c *DirentCache) Invalidate() {
}
// setMaxSize sets cache max size. If current size is larger than max size, the
// cache shrinks to acommodate the new max.
// cache shrinks to accommodate the new max.
func (c *DirentCache) setMaxSize(max uint64) {
c.mu.Lock()
c.maxSize = max
+1 -1
View File
@@ -29,7 +29,7 @@ import (
)
// DefaultDirentCacheSize is the default dirent cache size for 9P mounts. It can
// be adjusted independentely from the other dirent caches.
// be adjusted independently from the other dirent caches.
var DefaultDirentCacheSize uint64 = fs.DefaultDirentCacheSize
// +stateify savable
+1 -1
View File
@@ -134,7 +134,7 @@ const (
// LockRegion attempts to acquire a typed lock for the uid on a region
// of a file. Returns true if successful in locking the region. If false
// is returned, the caller should normally interpret this as "try again later" if
// accquiring the lock in a non-blocking mode or "interrupted" if in a blocking mode.
// acquiring the lock in a non-blocking mode or "interrupted" if in a blocking mode.
// Blocker is the interface used to provide blocking behavior, passing a nil Blocker
// will result in non-blocking behavior.
func (l *Locks) LockRegion(uid UniqueID, t LockType, r LockRange, block Blocker) bool {

Some files were not shown because too many files have changed in this diff Show More