summaryrefslogtreecommitdiff
path: root/src/pkg/syscall
diff options
context:
space:
mode:
authorGiles Lean <giles.lean@pobox.com>2010-04-06 10:28:55 -0700
committerGiles Lean <giles.lean@pobox.com>2010-04-06 10:28:55 -0700
commit722e1e4797b51df8a2062d9f28c03e3836d2f411 (patch)
treea630c87269a470bc7bb8873629937bb604efc3c2 /src/pkg/syscall
parentdba1f0ca0ff5d423660be58ffedc8fe0ced67a95 (diff)
downloadgolang-722e1e4797b51df8a2062d9f28c03e3836d2f411.tar.gz
syscall package: document that errno is zeroed on success
This is a documentation enhancement only, without any code change. The rationale for documenting this precisely is that Unix programmers who "know" that errno's value is undefined after a successful system call may be surprised otherwise and search to be sure that a zero errno may be relied upon after successful calls. R=r, rsc1, rsc CC=golang-dev http://codereview.appspot.com/812044 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/pkg/syscall')
-rw-r--r--src/pkg/syscall/syscall.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/syscall/syscall.go b/src/pkg/syscall/syscall.go
index 372149bf2..46f5c9876 100644
--- a/src/pkg/syscall/syscall.go
+++ b/src/pkg/syscall/syscall.go
@@ -9,6 +9,8 @@
// packages rather than this one if you can.
// For details of the functions and data types in this package consult
// the manuals for the appropriate operating system.
+// These calls return errno == 0 to indicate success; otherwise
+// errno is an operating system error number describing the failure.
package syscall
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)