aboutsummaryrefslogtreecommitdiff
path: root/src/syscall
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-03-01 23:21:55 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-03-02 00:13:47 +0000
commit5fea2ccc77eb50a9704fa04b7c61755fe34e1d95 (patch)
tree00137f90183ae2a01ca42249e04e9e4dabdf6249 /src/syscall
parent8b4deb448e587802f67930b765c9598fc8cd36e5 (diff)
downloadgo-5fea2ccc77eb50a9704fa04b7c61755fe34e1d95.tar.xz
all: single space after period.
The tree's pretty inconsistent about single space vs double space after a period in documentation. Make it consistently a single space, per earlier decisions. This means contributors won't be confused by misleading precedence. This CL doesn't use go/doc to parse. It only addresses // comments. It was generated with: $ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])') $ go test go/doc -update Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7 Reviewed-on: https://go-review.googlesource.com/20022 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Dave Day <djd@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/syscall')
-rw-r--r--src/syscall/exec_bsd.go2
-rw-r--r--src/syscall/exec_linux.go2
-rw-r--r--src/syscall/exec_plan9.go24
-rw-r--r--src/syscall/exec_solaris.go2
-rw-r--r--src/syscall/exec_unix.go22
-rw-r--r--src/syscall/syscall.go6
-rw-r--r--src/syscall/syscall_bsd.go2
-rw-r--r--src/syscall/syscall_darwin.go4
-rw-r--r--src/syscall/syscall_darwin_386.go2
-rw-r--r--src/syscall/syscall_darwin_amd64.go2
-rw-r--r--src/syscall/syscall_darwin_arm.go2
-rw-r--r--src/syscall/syscall_darwin_arm64.go2
-rw-r--r--src/syscall/syscall_dragonfly.go4
-rw-r--r--src/syscall/syscall_freebsd.go4
-rw-r--r--src/syscall/syscall_linux.go8
-rw-r--r--src/syscall/syscall_linux_386.go4
-rw-r--r--src/syscall/syscall_nacl.go2
-rw-r--r--src/syscall/syscall_solaris.go4
-rw-r--r--src/syscall/syscall_unix.go2
-rw-r--r--src/syscall/unzip_nacl.go2
20 files changed, 51 insertions, 51 deletions
diff --git a/src/syscall/exec_bsd.go b/src/syscall/exec_bsd.go
index d182896a53..47adffd60c 100644
--- a/src/syscall/exec_bsd.go
+++ b/src/syscall/exec_bsd.go
@@ -32,7 +32,7 @@ func runtime_AfterFork()
// If a dup or exec fails, write the errno error to pipe.
// (Pipe is close-on-exec so if exec succeeds, it will be closed.)
// In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork. This means
+// they might have been locked at the time of the fork. This means
// no rescheduling, no malloc calls, and no new stack segments.
// For the same reason compiler does not race instrument it.
// The calls to RawSyscall are okay because they are assembly
diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go
index 3e08d43bed..0ea9283bf6 100644
--- a/src/syscall/exec_linux.go
+++ b/src/syscall/exec_linux.go
@@ -48,7 +48,7 @@ func runtime_AfterFork()
// If a dup or exec fails, write the errno error to pipe.
// (Pipe is close-on-exec so if exec succeeds, it will be closed.)
// In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork. This means
+// they might have been locked at the time of the fork. This means
// no rescheduling, no malloc calls, and no new stack segments.
// For the same reason compiler does not race instrument it.
// The calls to RawSyscall are okay because they are assembly
diff --git a/src/syscall/exec_plan9.go b/src/syscall/exec_plan9.go
index d342cb02bc..b9e78c5ab4 100644
--- a/src/syscall/exec_plan9.go
+++ b/src/syscall/exec_plan9.go
@@ -15,31 +15,31 @@ import (
// Lock synchronizing creation of new file descriptors with fork.
//
// We want the child in a fork/exec sequence to inherit only the
-// file descriptors we intend. To do that, we mark all file
+// file descriptors we intend. To do that, we mark all file
// descriptors close-on-exec and then, in the child, explicitly
// unmark the ones we want the exec'ed program to keep.
// Unix doesn't make this easy: there is, in general, no way to
-// allocate a new file descriptor close-on-exec. Instead you
+// allocate a new file descriptor close-on-exec. Instead you
// have to allocate the descriptor and then mark it close-on-exec.
// If a fork happens between those two events, the child's exec
// will inherit an unwanted file descriptor.
//
// This lock solves that race: the create new fd/mark close-on-exec
// operation is done holding ForkLock for reading, and the fork itself
-// is done holding ForkLock for writing. At least, that's the idea.
+// is done holding ForkLock for writing. At least, that's the idea.
// There are some complications.
//
// Some system calls that create new file descriptors can block
// for arbitrarily long times: open on a hung NFS server or named
-// pipe, accept on a socket, and so on. We can't reasonably grab
+// pipe, accept on a socket, and so on. We can't reasonably grab
// the lock across those operations.
//
// It is worse to inherit some file descriptors than others.
// If a non-malicious child accidentally inherits an open ordinary file,
-// that's not a big deal. On the other hand, if a long-lived child
+// that's not a big deal. On the other hand, if a long-lived child
// accidentally inherits the write end of a pipe, then the reader
// of that pipe will not see EOF until that child exits, potentially
-// causing the parent program to hang. This is a common problem
+// causing the parent program to hang. This is a common problem
// in threaded C programs that use popen.
//
// Luckily, the file descriptors that are most important not to
@@ -49,13 +49,13 @@ import (
// The rules for which file descriptor-creating operations use the
// ForkLock are as follows:
//
-// 1) Pipe. Does not block. Use the ForkLock.
-// 2) Socket. Does not block. Use the ForkLock.
-// 3) Accept. If using non-blocking mode, use the ForkLock.
+// 1) Pipe. Does not block. Use the ForkLock.
+// 2) Socket. Does not block. Use the ForkLock.
+// 3) Accept. If using non-blocking mode, use the ForkLock.
// Otherwise, live with the race.
-// 4) Open. Can block. Use O_CLOEXEC if available (Linux).
+// 4) Open. Can block. Use O_CLOEXEC if available (Linux).
// Otherwise, live with the race.
-// 5) Dup. Does not block. Use the ForkLock.
+// 5) Dup. Does not block. Use the ForkLock.
// On Linux, could use fcntl F_DUPFD_CLOEXEC
// instead of the ForkLock, but only for dup(fd, -1).
@@ -169,7 +169,7 @@ func init() {
// (The pipe write end is close-on-exec so if exec succeeds, it will be closed.)
//
// In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork. This means
+// they might have been locked at the time of the fork. This means
// no rescheduling, no malloc calls, and no new stack segments.
// The calls to RawSyscall are okay because they are assembly
// functions that do not grow the stack.
diff --git a/src/syscall/exec_solaris.go b/src/syscall/exec_solaris.go
index 63fa8482da..c2b2949462 100644
--- a/src/syscall/exec_solaris.go
+++ b/src/syscall/exec_solaris.go
@@ -44,7 +44,7 @@ func write1(fd uintptr, buf uintptr, nbyte uintptr) (n uintptr, err Errno)
// If a dup or exec fails, write the errno error to pipe.
// (Pipe is close-on-exec so if exec succeeds, it will be closed.)
// In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork. This means
+// they might have been locked at the time of the fork. This means
// no rescheduling, no malloc calls, and no new stack segments.
//
// We call hand-crafted syscalls, implemented in
diff --git a/src/syscall/exec_unix.go b/src/syscall/exec_unix.go
index 565252cb4a..82e33124e2 100644
--- a/src/syscall/exec_unix.go
+++ b/src/syscall/exec_unix.go
@@ -17,31 +17,31 @@ import (
// Lock synchronizing creation of new file descriptors with fork.
//
// We want the child in a fork/exec sequence to inherit only the
-// file descriptors we intend. To do that, we mark all file
+// file descriptors we intend. To do that, we mark all file
// descriptors close-on-exec and then, in the child, explicitly
// unmark the ones we want the exec'ed program to keep.
// Unix doesn't make this easy: there is, in general, no way to
-// allocate a new file descriptor close-on-exec. Instead you
+// allocate a new file descriptor close-on-exec. Instead you
// have to allocate the descriptor and then mark it close-on-exec.
// If a fork happens between those two events, the child's exec
// will inherit an unwanted file descriptor.
//
// This lock solves that race: the create new fd/mark close-on-exec
// operation is done holding ForkLock for reading, and the fork itself
-// is done holding ForkLock for writing. At least, that's the idea.
+// is done holding ForkLock for writing. At least, that's the idea.
// There are some complications.
//
// Some system calls that create new file descriptors can block
// for arbitrarily long times: open on a hung NFS server or named
-// pipe, accept on a socket, and so on. We can't reasonably grab
+// pipe, accept on a socket, and so on. We can't reasonably grab
// the lock across those operations.
//
// It is worse to inherit some file descriptors than others.
// If a non-malicious child accidentally inherits an open ordinary file,
-// that's not a big deal. On the other hand, if a long-lived child
+// that's not a big deal. On the other hand, if a long-lived child
// accidentally inherits the write end of a pipe, then the reader
// of that pipe will not see EOF until that child exits, potentially
-// causing the parent program to hang. This is a common problem
+// causing the parent program to hang. This is a common problem
// in threaded C programs that use popen.
//
// Luckily, the file descriptors that are most important not to
@@ -51,13 +51,13 @@ import (
// The rules for which file descriptor-creating operations use the
// ForkLock are as follows:
//
-// 1) Pipe. Does not block. Use the ForkLock.
-// 2) Socket. Does not block. Use the ForkLock.
-// 3) Accept. If using non-blocking mode, use the ForkLock.
+// 1) Pipe. Does not block. Use the ForkLock.
+// 2) Socket. Does not block. Use the ForkLock.
+// 3) Accept. If using non-blocking mode, use the ForkLock.
// Otherwise, live with the race.
-// 4) Open. Can block. Use O_CLOEXEC if available (Linux).
+// 4) Open. Can block. Use O_CLOEXEC if available (Linux).
// Otherwise, live with the race.
-// 5) Dup. Does not block. Use the ForkLock.
+// 5) Dup. Does not block. Use the ForkLock.
// On Linux, could use fcntl F_DUPFD_CLOEXEC
// instead of the ForkLock, but only for dup(fd, -1).
diff --git a/src/syscall/syscall.go b/src/syscall/syscall.go
index 769e6b9fd5..bb102c6e13 100644
--- a/src/syscall/syscall.go
+++ b/src/syscall/syscall.go
@@ -3,10 +3,10 @@
// license that can be found in the LICENSE file.
// Package syscall contains an interface to the low-level operating system
-// primitives. The details vary depending on the underlying system, and
+// primitives. The details vary depending on the underlying system, and
// by default, godoc will display the syscall documentation for the current
-// system. If you want godoc to display syscall documentation for another
-// system, set $GOOS and $GOARCH to the desired system. For example, if
+// system. If you want godoc to display syscall documentation for another
+// system, set $GOOS and $GOARCH to the desired system. For example, if
// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
// to freebsd and $GOARCH to arm.
// The primary use of syscall is inside other packages that provide a more
diff --git a/src/syscall/syscall_bsd.go b/src/syscall/syscall_bsd.go
index af563910b1..9370dd487e 100644
--- a/src/syscall/syscall_bsd.go
+++ b/src/syscall/syscall_bsd.go
@@ -33,7 +33,7 @@ func Getgroups() (gids []int, err error) {
return nil, nil
}
- // Sanity check group count. Max is 16 on BSD.
+ // Sanity check group count. Max is 16 on BSD.
if n < 0 || n > 1000 {
return nil, EINVAL
}
diff --git a/src/syscall/syscall_darwin.go b/src/syscall/syscall_darwin.go
index 52fd4e7094..1a3efd1e8f 100644
--- a/src/syscall/syscall_darwin.go
+++ b/src/syscall/syscall_darwin.go
@@ -53,7 +53,7 @@ func nametomib(name string) (mib []_C_int, err error) {
// NOTE(rsc): It seems strange to set the buffer to have
// size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
+ // as the size. I don't know why the +2 is here, but the
// kernel uses +2 for its own implementation of this function.
// I am scared that if we don't include the +2 here, the kernel
// will silently write 2 words farther than we specify
@@ -76,7 +76,7 @@ func nametomib(name string) (mib []_C_int, err error) {
}
// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
+// appending the names to names. It returns the number
// bytes consumed from buf, the number of entries added
// to names, and the new names slice.
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
diff --git a/src/syscall/syscall_darwin_386.go b/src/syscall/syscall_darwin_386.go
index 2074e7ac2e..7dbb1c3d64 100644
--- a/src/syscall/syscall_darwin_386.go
+++ b/src/syscall/syscall_darwin_386.go
@@ -28,7 +28,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
func Gettimeofday(tv *Timeval) (err error) {
// The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
+ // but is otherwise unused. The answers come back
// in the two registers.
sec, usec, err := gettimeofday(tv)
tv.Sec = int32(sec)
diff --git a/src/syscall/syscall_darwin_amd64.go b/src/syscall/syscall_darwin_amd64.go
index 70b53b87f4..80e6024aeb 100644
--- a/src/syscall/syscall_darwin_amd64.go
+++ b/src/syscall/syscall_darwin_amd64.go
@@ -28,7 +28,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
func Gettimeofday(tv *Timeval) (err error) {
// The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
+ // but is otherwise unused. The answers come back
// in the two registers.
sec, usec, err := gettimeofday(tv)
tv.Sec = sec
diff --git a/src/syscall/syscall_darwin_arm.go b/src/syscall/syscall_darwin_arm.go
index 2a7d4f2db6..c302d83131 100644
--- a/src/syscall/syscall_darwin_arm.go
+++ b/src/syscall/syscall_darwin_arm.go
@@ -28,7 +28,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
func Gettimeofday(tv *Timeval) (err error) {
// The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
+ // but is otherwise unused. The answers come back
// in the two registers.
sec, usec, err := gettimeofday(tv)
tv.Sec = int32(sec)
diff --git a/src/syscall/syscall_darwin_arm64.go b/src/syscall/syscall_darwin_arm64.go
index de7a08bee0..29f40d4229 100644
--- a/src/syscall/syscall_darwin_arm64.go
+++ b/src/syscall/syscall_darwin_arm64.go
@@ -28,7 +28,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
func Gettimeofday(tv *Timeval) (err error) {
// The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
+ // but is otherwise unused. The answers come back
// in the two registers.
sec, usec, err := gettimeofday(tv)
tv.Sec = sec
diff --git a/src/syscall/syscall_dragonfly.go b/src/syscall/syscall_dragonfly.go
index c25963c437..7e693290a8 100644
--- a/src/syscall/syscall_dragonfly.go
+++ b/src/syscall/syscall_dragonfly.go
@@ -34,7 +34,7 @@ func nametomib(name string) (mib []_C_int, err error) {
// NOTE(rsc): It seems strange to set the buffer to have
// size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
+ // as the size. I don't know why the +2 is here, but the
// kernel uses +2 for its own implementation of this function.
// I am scared that if we don't include the +2 here, the kernel
// will silently write 2 words farther than we specify
@@ -57,7 +57,7 @@ func nametomib(name string) (mib []_C_int, err error) {
}
// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
+// appending the names to names. It returns the number
// bytes consumed from buf, the number of entries added
// to names, and the new names slice.
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
diff --git a/src/syscall/syscall_freebsd.go b/src/syscall/syscall_freebsd.go
index 257d41960f..7bb163a53b 100644
--- a/src/syscall/syscall_freebsd.go
+++ b/src/syscall/syscall_freebsd.go
@@ -32,7 +32,7 @@ func nametomib(name string) (mib []_C_int, err error) {
// NOTE(rsc): It seems strange to set the buffer to have
// size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
+ // as the size. I don't know why the +2 is here, but the
// kernel uses +2 for its own implementation of this function.
// I am scared that if we don't include the +2 here, the kernel
// will silently write 2 words farther than we specify
@@ -55,7 +55,7 @@ func nametomib(name string) (mib []_C_int, err error) {
}
// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
+// appending the names to names. It returns the number
// bytes consumed from buf, the number of entries added
// to names, and the new names slice.
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
diff --git a/src/syscall/syscall_linux.go b/src/syscall/syscall_linux.go
index 2875067df7..73a16f8959 100644
--- a/src/syscall/syscall_linux.go
+++ b/src/syscall/syscall_linux.go
@@ -163,7 +163,7 @@ func Getgroups() (gids []int, err error) {
return nil, nil
}
- // Sanity check group count. Max is 1<<16 on Linux.
+ // Sanity check group count. Max is 1<<16 on Linux.
if n < 0 || n > 1<<20 {
return nil, EINVAL
}
@@ -198,8 +198,8 @@ type WaitStatus uint32
// 0x7F (stopped), or a signal number that caused an exit.
// The 0x80 bit is whether there was a core dump.
// An extra number (exit code, signal causing a stop)
-// is in the high bits. At least that's the idea.
-// There are various irregularities. For example, the
+// is in the high bits. At least that's the idea.
+// There are various irregularities. For example, the
// "continued" status is 0xFFFF, distinguishing itself
// from stopped via the core dump bit.
@@ -620,7 +620,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err erro
var buf [sizeofPtr]byte
- // Leading edge. PEEKTEXT/PEEKDATA don't require aligned
+ // Leading edge. PEEKTEXT/PEEKDATA don't require aligned
// access (PEEKUSER warns that it might), but if we don't
// align our reads, we might straddle an unmapped page
// boundary and not get the bytes leading up to the page
diff --git a/src/syscall/syscall_linux_386.go b/src/syscall/syscall_linux_386.go
index 0e637b47d3..d9e0ed57ed 100644
--- a/src/syscall/syscall_linux_386.go
+++ b/src/syscall/syscall_linux_386.go
@@ -182,9 +182,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// On x86 Linux, all the socket calls go through an extra indirection,
// I think because the 5-register system call interface can't handle
-// the 6-argument calls like sendto and recvfrom. Instead the
+// the 6-argument calls like sendto and recvfrom. Instead the
// arguments to the underlying system call are the number below
-// and a pointer to an array of uintptr. We hide the pointer in the
+// and a pointer to an array of uintptr. We hide the pointer in the
// socketcall assembly to avoid allocation on every system call.
const (
diff --git a/src/syscall/syscall_nacl.go b/src/syscall/syscall_nacl.go
index bbeb22a66c..ba6eafed1c 100644
--- a/src/syscall/syscall_nacl.go
+++ b/src/syscall/syscall_nacl.go
@@ -59,7 +59,7 @@ func clen(n []byte) int {
const PathMax = 256
// An Errno is an unsigned number describing an error condition.
-// It implements the error interface. The zero Errno is by convention
+// It implements the error interface. The zero Errno is by convention
// a non-error, so code to convert from Errno to error should use:
// err = nil
// if errno != 0 {
diff --git a/src/syscall/syscall_solaris.go b/src/syscall/syscall_solaris.go
index 2f68760ed1..b307a80d28 100644
--- a/src/syscall/syscall_solaris.go
+++ b/src/syscall/syscall_solaris.go
@@ -39,7 +39,7 @@ func clen(n []byte) int {
}
// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
+// appending the names to names. It returns the number
// bytes consumed from buf, the number of entries added
// to names, and the new names slice.
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
@@ -176,7 +176,7 @@ func Getgroups() (gids []int, err error) {
return nil, nil
}
- // Sanity check group count. Max is 16 on BSD.
+ // Sanity check group count. Max is 16 on BSD.
if n < 0 || n > 1000 {
return nil, EINVAL
}
diff --git a/src/syscall/syscall_unix.go b/src/syscall/syscall_unix.go
index 570313394c..4dae9d9b18 100644
--- a/src/syscall/syscall_unix.go
+++ b/src/syscall/syscall_unix.go
@@ -91,7 +91,7 @@ func (m *mmapper) Munmap(data []byte) (err error) {
}
// An Errno is an unsigned number describing an error condition.
-// It implements the error interface. The zero Errno is by convention
+// It implements the error interface. The zero Errno is by convention
// a non-error, so code to convert from Errno to error should use:
// err = nil
// if errno != 0 {
diff --git a/src/syscall/unzip_nacl.go b/src/syscall/unzip_nacl.go
index 5845e44f01..14b5bd154f 100644
--- a/src/syscall/unzip_nacl.go
+++ b/src/syscall/unzip_nacl.go
@@ -162,7 +162,7 @@ func (f *decompressor) readHuffman() {
// Decode a single Huffman block from f.
// hl and hd are the Huffman states for the lit/length values
-// and the distance values, respectively. If hd == nil, using the
+// and the distance values, respectively. If hd == nil, using the
// fixed distance encoding associated with fixed Huffman blocks.
func (f *decompressor) huffmanBlock(hl, hd *huffmanDecoder) {
for {