diff options
author | Robert Griesemer <gri@golang.org> | 2009-11-06 14:24:38 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-11-06 14:24:38 -0800 |
commit | 828334dd95ce8e4bf3662bd5c89d7c417f0741d0 (patch) | |
tree | fd7e0c9961bc3af2ddf105e9cc1943f2509ac584 /src/pkg/syscall/syscall_linux.go | |
parent | eb5cdfd67ff6d32df4c4c27840eaee027c5e3512 (diff) | |
download | golang-828334dd95ce8e4bf3662bd5c89d7c417f0741d0.tar.gz |
- fine-tuning of one-line func heuristic (nodes.go)
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)
R=r, rsc
CC=go-dev
http://go/go-review/1026006
Diffstat (limited to 'src/pkg/syscall/syscall_linux.go')
-rw-r--r-- | src/pkg/syscall/syscall_linux.go | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go index 900889df6..e4b82569e 100644 --- a/src/pkg/syscall/syscall_linux.go +++ b/src/pkg/syscall/syscall_linux.go @@ -120,25 +120,15 @@ const ( shift = 8; ) -func (w WaitStatus) Exited() bool { - return w&mask == exited; -} +func (w WaitStatus) Exited() bool { return w&mask == exited } -func (w WaitStatus) Signaled() bool { - return w&mask != stopped && w&mask != exited; -} +func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited } -func (w WaitStatus) Stopped() bool { - return w&0xFF == stopped; -} +func (w WaitStatus) Stopped() bool { return w&0xFF == stopped } -func (w WaitStatus) Continued() bool { - return w == 0xFFFF; -} +func (w WaitStatus) Continued() bool { return w == 0xFFFF } -func (w WaitStatus) CoreDump() bool { - return w.Signaled() && w&core != 0; -} +func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } func (w WaitStatus) ExitStatus() int { if !w.Exited() { @@ -536,17 +526,11 @@ func PtraceCont(pid int, signal int) (errno int) { return ptrace(PTRACE_CONT, pid, 0, uintptr(signal)); } -func PtraceSingleStep(pid int) (errno int) { - return ptrace(PTRACE_SINGLESTEP, pid, 0, 0); -} +func PtraceSingleStep(pid int) (errno int) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) } -func PtraceAttach(pid int) (errno int) { - return ptrace(PTRACE_ATTACH, pid, 0, 0); -} +func PtraceAttach(pid int) (errno int) { return ptrace(PTRACE_ATTACH, pid, 0, 0) } -func PtraceDetach(pid int) (errno int) { - return ptrace(PTRACE_DETACH, pid, 0, 0); -} +func PtraceDetach(pid int) (errno int) { return ptrace(PTRACE_DETACH, pid, 0, 0) } // Sendto // Recvfrom |